Vagrantfile
which tells Vagrant how to set up your virtual machine in VirtualBox.Vagrantfile
$ ansible-galaxy install -r requirements.yml
vagrant up
, and Vagrant will create a new VM, install the base box, and configure it.vagrant up
is complete and you're back at the command prompt), you can log into it via SSH if you'd like by typing in vagrant ssh
. Otherwise, the next steps are below.org.apache.pdfbox.pdmodel.edit
was removed. The only class contained PDPageContentStream
was moved to the parent package.getCOSDictionary()
is no longer used. Instead getCOSObject
now returns the matching COSBase
subtype.PDXObjectForm
was renamed to PDFormXObject
to be more in line with the PDF specification.PDXObjectImage
was renamed to PDImageXObject
to be more in line with the PDF specification.PDPage.getContents().createInputStream()
was simplified to PDPage.getContents()
.PDPageContentStream
was moved to org.apache.pdfbox.pdmodel
.PDDocument.loadNonSeq
with PDFBox 1.8.x. Users still using PDDocument.load
with PDFBox 1.8.x might experience differentresults when switching to PDFBox 2.0.0.PDAfmPfbFont
has been removed. To load such a font pass the pfb file to PDType1Font
. Loading the afm file is no longer required.PDResources.addFont(PDFont font)
and PDResources.addXObject(PDXObject xobject, String prefix)
have been replaced with PDResources.add(resource type)
where resource type
represents the different resource classes such as PDFont
, PDAbstractPattern
and so on. The add
method now supports all the different type of resources available.Map
like with PDResources.getFonts()
or PDResources.getXObjects()
in 2.0 an Iterable<COSName>
of references shall be retrieved with PDResources.getFontNames()
orPDResources.getXObjectNames()
. The individual item can be retrieved with PDResources.getFont(COSName fontName)
or PDResources.getXObject(COSName xObjectName)
.PDJpeg()
, PDPixelMap()
and PDCCitt()
to import images have been replaced with PDImageXObject.createFromFile
which works for JPG, TIFF (only G4 compression), PNG, BMP and GIF.JPEGFactory.createFromStream
which preserve the JPEG data and embed it in the PDF file without modification. (This is best if you have a JPEG file).CCITTFactory.createFromFile
(for bitonal TIFF images with G4 compression).LosslessFactory.createFromImage
(this is best if you start with a BufferedImage).PDPage.convertToImage
and PDFImageWriter
have been removed. Instead the new PDFRenderer
class shall be used.ImageIOUtil
has been moved into the org.apache.pdfbox.tools.imageio
package. This is in the pdfbox-tools
download. If you are using maven, the artifactId
has the same name.-Dsun.java2d.cmm=sun.java2d.cmm.kcms.KcmsServiceProvider
or callSystem.setProperty('sun.java2d.cmm', 'sun.java2d.cmm.kcms.KcmsServiceProvider');
-Dorg.apache.pdfbox.rendering.UsePureJavaCMYKConversion=true
PDFPrinter
has been removed.PDFPrinter.silentPrint()
should now use this code:PDFPrinter.print()
should now use this code:PDFTextStripper
and add the following Operators
to the constructor:PDNonTerminalField
class.PDField
subclasses now accept Java generic types such as String
as parameters instead of the former COSBase
subclasses.PDField.getWidget()
has been removed in favour of PDField.getWidgets()
which returns allannotations associated with a field.PDUnknownField
class has been removed, such fields are treated as null
see PDFBOX-2885.PDOutlineNode.appendChild()
has been renamed to PDOutlineNode.addLast()
. There is now also a complementary method PDOutlineNode.addFirst()
.