pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r969361 - in /websites/staging/pdfbox/trunk/content: ./ 2.0/migration.html
Date Sun, 18 Oct 2015 14:20:33 GMT
Author: buildbot
Date: Sun Oct 18 14:20:33 2015
New Revision: 969361

Log:
Staging update by buildbot for pdfbox

Modified:
    websites/staging/pdfbox/trunk/content/   (props changed)
    websites/staging/pdfbox/trunk/content/2.0/migration.html

Propchange: websites/staging/pdfbox/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Sun Oct 18 14:20:33 2015
@@ -1 +1 @@
-1709281
+1709282

Modified: websites/staging/pdfbox/trunk/content/2.0/migration.html
==============================================================================
--- websites/staging/pdfbox/trunk/content/2.0/migration.html (original)
+++ websites/staging/pdfbox/trunk/content/2.0/migration.html Sun Oct 18 14:20:33 2015
@@ -186,12 +186,15 @@ h2:hover > .headerlink, h3:hover > .head
 <h3 id="deprecated-api-calls">Deprecated API calls<a class="headerlink" href="#deprecated-api-calls"
title="Permanent link">&para;</a></h3>
 <p>Most deprecated API calls in PDFBox 1.8.x have been removed for PDFBox 2.0.0 </p>
 <h3 id="api-changes">API Changes<a class="headerlink" href="#api-changes" title="Permanent
link">&para;</a></h3>
-<p>The API changes are reflected in the Javadoc for PDFBox 2.0.0. The most notable
changes are:</p>
-<ul>
-<li><code>getCOSDictionary()</code> is no longer used. Instead <code>getCOSObject</code>
now returns the matching <code>COSBase</code> subtype.</li>
-<li><code>PDXObjectForm</code> was renamed to <code>PDFormXObject</code>
 </li>
-<li><code>PDXObjectImage</code> was renamed to <code>PDImageXObject</code></li>
-</ul>
+<p>The API changes are reflected in the Javadoc for PDFBox 2.0.0. The most notable
changes are:
+- <code>getCOSDictionary()</code> is no longer used. Instead <code>getCOSObject</code>
now returns the matching <code>COSBase</code> subtype.
+- <code>PDXObjectForm</code> was renamed to <code>PDFormXObject</code>
to be more in line with the PDF specification.
+- <code>PDXObjectImage</code> was renamed to <code>PDImageXObject</code>
to be more in line with the PDF specification.
+- <code>PDPage.getContents().createInputStream()</code>was simplified to <code>PDPage.getContents()</code>.</p>
+<h3 id="general-behaviour">General Behaviour<a class="headerlink" href="#general-behaviour"
title="Permanent link">&para;</a></h3>
+<p>PDFBox 2.0.0 is now parsing PDF files following the Xref information in the PDF.
This is similar to the functionality using
+<code>PDDocument.loadNonSeq</code> with PDFBox 1.8.x. Users still using <code>PDDocument.load</code>
with PDFBox 1.8.x might experience different
+results when switching to PDFBox 2.0.0.</p>
 <h3 id="font-handling">Font Handling<a class="headerlink" href="#font-handling"
title="Permanent link">&para;</a></h3>
 <p>Font handling now has full Unicode support and supports font subsetting.</p>
 <p>TrueType fonts shall now be loaded using</p>
@@ -204,10 +207,12 @@ h2:hover > .headerlink, h3:hover > .head
 <p>The individual calls to add resources such as <code>PDResource.addFont(PDFont
font)</code> and <code>PDResource.addXObject(PDXObject xobject, String prefix)</code>
 have been replaced with <code>PDResource.add(resource type)</code> where <code>resource
type</code> represents the different resource classes such as <code>PDFont</code>,
<code>PDAbstractPattern</code>
 and so on. The <code>add</code> method now supports all the different type of
resources available.</p>
-<h3 id="general-behaviour">General Behaviour<a class="headerlink" href="#general-behaviour"
title="Permanent link">&para;</a></h3>
-<p>PDFBox 2.0.0 is now parsing PDF files following the Xref information in the PDF.
This is similar to the functionality using
-<code>PDDocument.loadNonSeq</code> with PDFBox 1.8.x. Users still using <code>PDDocument.load</code>
with PDFBox 1.8.x might experience different
-results when switching to PDFBox 2.0.0.</p>
+<h3 id="working-with-images">Working with Images<a class="headerlink" href="#working-with-images"
title="Permanent link">&para;</a></h3>
+<p>The individual classes <code>PDJpeg()</code>, <code>PDPixelMap()</code>
and <code>PDCCitt()</code> to import images have been replaced with <code>PDImageXObject.createFromFile</code>
which works for JPG, TIFF (only G4 compression), PNG, BMP and GIF.</p>
+<p>In addition there are some specialized classes:
+- <code>JPEGFactory.createFromStream</code> which preserve the JPEG data and
embed it in the PDF file without modification. (This is best if you have a JPEG file).
+- <code>CCITTFactory.createFromFile</code> (for bitonal TIFF images with G4 compression).
+- <code>LosslessFactory.createFromImage</code> (this is best if you start with
a BufferedImage).</p>
 <h3 id="iterating-pages">Iterating Pages<a class="headerlink" href="#iterating-pages"
title="Permanent link">&para;</a></h3>
 <p>With PDFBox 2.0.0 the prefered way to iterate through the pages of a document is</p>
 <div class="codehilite"><pre><span class="k">for</span><span class="p">(</span><span
class="n">PDPage</span> <span class="n">page</span> <span class="p">:</span>
<span class="n">document</span><span class="p">.</span><span class="n">getPages</span><span
class="p">())</span>



Mime
View raw message