pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From msahy...@apache.org
Subject svn commit: r1708875 - in /pdfbox/cmssite/trunk: content/2.0/migration.md templates/skeleton.html
Date Thu, 15 Oct 2015 19:21:58 GMT
Author: msahyoun
Date: Thu Oct 15 19:21:58 2015
New Revision: 1708875

URL: http://svn.apache.org/viewvc?rev=1708875&view=rev
Log:
PDFBOX-3030: initial migration guide

Added:
    pdfbox/cmssite/trunk/content/2.0/migration.md
Modified:
    pdfbox/cmssite/trunk/templates/skeleton.html

Added: pdfbox/cmssite/trunk/content/2.0/migration.md
URL: http://svn.apache.org/viewvc/pdfbox/cmssite/trunk/content/2.0/migration.md?rev=1708875&view=auto
==============================================================================
--- pdfbox/cmssite/trunk/content/2.0/migration.md (added)
+++ pdfbox/cmssite/trunk/content/2.0/migration.md Thu Oct 15 19:21:58 2015
@@ -0,0 +1,77 @@
+Title:     PDFBox 2.0.0 Migration Guide 
+
+# Migration to PDFBox 2.0.0
+
+## Environment
+PDFBox 2.0.0 requires at least Java 6
+ 
+## Dependency updates
+All libraries on which PDFBox depends are updated to their latest stable versions:
+
+- Bouncy Castle 1.53
+- Apache Commons Logging 1.2
+
+For test support the libraries are updated to
+
+- JUnit 4.12
+- JAI Image Core 1.2
+- Levigo JBIG ImageIO Plugin 1.6.3
+
+## Breaking Changes to the Library
+
+### Deprecated API calls
+Most deprecated API calls in PDFBox 1.8.x have been removed for PDFBox 2.0.0 
+
+### API Changes
+The API changes are reflected in the Javadoc for PDFBox 2.0.0. Most notably `getCOSDictionary()`
is no longer used. Instead
+`getCOSObject` now returns the matching `COSBase` subtype. 
+
+### General Behaviour
+PDFBox 2.0.0 is now parsing PDF files following the Xref information in the PDF. This is
similar to the functionality using
+`PDDocument.loadNonSeq` with PDFBox 1.8.x. Users still using `PDDocument.load` with PDFBox
1.8.x might experience different
+results when switching to PDFBox 2.0.0.
+
+### Iterating Pages
+With PDFBox 2.0.0 the prefered way to iterate through the pages of a document is
+
+    for(PDPage page : doc.getPages())
+    {
+     ... (do something)
+    }
+
+### PDF Rendering
+
+### PDF Printing
+
+With PDFBox 2.0.0 `PDFPrinter` has been removed.
+
+Users of `PDFPrinter.silentPrint()` should now use this code:
+
+    PrinterJob job = PrinterJob.getPrinterJob();
+    job.setPageable(new PDFPageable(document));
+    job.print();
+
+While users of `PDFPrinter.print()` should now use this code:
+
+    PrinterJob job = PrinterJob.getPrinterJob();
+    job.setPageable(new PDFPageable(document));
+    if (job.printDialog()) {
+        job.print();
+    }
+
+Advanced use case examples can be found in th examples package under org/apache/pdfbox/examples/printing/Printing.java
+
+### Interactive Forms
+Large parts of the support for interactive forms (AcroForms) has been rewritten. The most
notable change from 1.8.x is that
+there is a clear distinction between fields and the annotations representing them visually.
Intermediate nodes in a field 
+tree are now represented by the `PDNonTerminalField` class.
+
+With PDFBox 2.0.0 the prefered way to iterate through the fields is now
+
+    for (PDField field : form.getFieldTree())
+    {
+        ... (do something)
+    }
+
+Most `PDField` subclasses now accept Java generic types such as `String` as parameters instead
of the former `COSBase`subclasses.
+

Modified: pdfbox/cmssite/trunk/templates/skeleton.html
URL: http://svn.apache.org/viewvc/pdfbox/cmssite/trunk/templates/skeleton.html?rev=1708875&r1=1708874&r2=1708875&view=diff
==============================================================================
--- pdfbox/cmssite/trunk/templates/skeleton.html (original)
+++ pdfbox/cmssite/trunk/templates/skeleton.html Thu Oct 15 19:21:58 2015
@@ -106,6 +106,7 @@
                     <li class="sidebar-node" id="v2-0">
                         <a href="#">2.0.0 (trunk)</a>
                         <ul>
+                            <li><a href="/2.0/migration.html">Migration Guide</a></li>
                             <li><a href="/2.0/getting-started.html">Getting Started</a></li>
                             <li><a href="/2.0/examples.html">Examples</a></li>
                             <li><a href="/2.0/dependencies.html">Dependencies</a></li>



Mime
View raw message