Deprecated API


Contents
Deprecated Classes
org.apache.pdfbox.encryption.DocumentEncryption
          use the new security API instead. 
org.apache.pdfbox.util.ICU4JImpl
          will be removed in 2.0.0 
org.apache.pdfbox.pdmodel.encryption.PDEncryptionManager
          Made deprecated by the new security layer of PDFBox. Use SecurityHandlers instead. 
org.apache.pdfbox.encryption.PDFEncryption
          use the new security layer instead 
org.apache.pdfbox.pdmodel.interactive.form.PDSignature
          Use PDSignatureField instead (see PDFBOX-1513). 
org.apache.pdfbox.pdmodel.encryption.PDStandardEncryption
          Made deprecated by the new security layer of PDFBox. Use SecurityHandlers instead. 
 

Deprecated Exceptions
org.apache.pdfbox.exceptions.WrappedException
          java.lang.Exception itself has wrapper capabilities since Java 1.4 
 

Deprecated Fields
org.apache.pdfbox.pdmodel.interactive.viewerpreferences.PDViewerPreferences.BOUNDARY_ART_BOX
          use PDViewerPreferences.BOUNDARY instead 
org.apache.pdfbox.pdmodel.interactive.viewerpreferences.PDViewerPreferences.BOUNDARY_BLEED_BOX
          use PDViewerPreferences.BOUNDARY instead 
org.apache.pdfbox.pdmodel.interactive.viewerpreferences.PDViewerPreferences.BOUNDARY_CROP_BOX
          use PDViewerPreferences.BOUNDARY instead 
org.apache.pdfbox.pdmodel.interactive.viewerpreferences.PDViewerPreferences.BOUNDARY_MEDIA_BOX
          use PDViewerPreferences.BOUNDARY instead 
org.apache.pdfbox.pdmodel.interactive.viewerpreferences.PDViewerPreferences.BOUNDARY_TRIM_BOX
          use PDViewerPreferences.BOUNDARY instead 
org.apache.pdfbox.Overlay.EXT_G_STATE
          use the COSName.EXT_G_STATE constant instead 
org.apache.pdfbox.pdmodel.interactive.viewerpreferences.PDViewerPreferences.NON_FULL_SCREEN_PAGE_MODE_USE_NONE
          use PDViewerPreferences.NON_FULL_SCREEN_PAGE_MODE instead 
org.apache.pdfbox.pdmodel.interactive.viewerpreferences.PDViewerPreferences.NON_FULL_SCREEN_PAGE_MODE_USE_OPTIONAL_CONTENT
          use PDViewerPreferences.NON_FULL_SCREEN_PAGE_MODE instead 
org.apache.pdfbox.pdmodel.interactive.viewerpreferences.PDViewerPreferences.NON_FULL_SCREEN_PAGE_MODE_USE_OUTLINES
          use PDViewerPreferences.NON_FULL_SCREEN_PAGE_MODE instead 
org.apache.pdfbox.pdmodel.interactive.viewerpreferences.PDViewerPreferences.NON_FULL_SCREEN_PAGE_MODE_USE_THUMBS
          use PDViewerPreferences.NON_FULL_SCREEN_PAGE_MODE instead 
org.apache.pdfbox.cos.COSNumber.ONE
          Use the COSInteger.ONE constant instead 
org.apache.pdfbox.Overlay.PROC_SET
          use the COSName.PROC_SET constant instead 
org.apache.pdfbox.pdmodel.interactive.viewerpreferences.PDViewerPreferences.READING_DIRECTION_L2R
          use PDViewerPreferences.READING_DIRECTION instead 
org.apache.pdfbox.pdmodel.interactive.viewerpreferences.PDViewerPreferences.READING_DIRECTION_R2L
          use PDViewerPreferences.READING_DIRECTION instead 
org.apache.pdfbox.Overlay.XOBJECT
          use the COSName.XOBJECT constant instead 
org.apache.pdfbox.cos.COSNumber.ZERO
          Use the COSInteger.ZERO constant instead 
 

Deprecated Methods
org.apache.pdfbox.pdmodel.PDDocument.clearWillEncryptWhenSaving()
          Do not rely on this method anymore. It is the responsability of COSWriter to hold this state. 
org.apache.pdfbox.pdfviewer.PageDrawer.colorChanged(boolean)
           
org.apache.pdfbox.pdmodel.font.PDFontFactory.createFont(COSDictionary, Map)
          due to some side effects font caching is no longer supported, use PDFontFactory.createFont(COSDictionary) instead 
org.apache.pdfbox.WriteDecodedDoc.doIt(String, String)
          use WriteDecodedDoc.doIt(String, String, String, boolean) instead. 
org.apache.pdfbox.pdmodel.font.PDFont.drawString(String, Graphics, float, AffineTransform, float, float)
          use PDFont.drawString(String, int[], Graphics, float, AffineTransform, float, float) instead 
org.apache.pdfbox.pdmodel.encryption.SecurityHandler.encryptData(long, long, InputStream, OutputStream)
          While this works fine for RC4 encryption, it will never decrypt AES data You should use encryptData(objectNumber, genNumber, data, output, decrypt) which can do everything. This function is just here for compatibility reasons and will be removed in the future. 
org.apache.pdfbox.pdmodel.common.PDMetadata.exportXMPMetadata()
          will return an InputStream in the future. 
org.apache.pdfbox.pdmodel.interactive.action.type.PDActionURI.getBase()
          use PDURIDictionary.getBase() instead 
org.apache.pdfbox.pdmodel.graphics.xobject.PDPixelMap.getDecodeParams()
          Use PDStream.getDecodeParms() instead 
org.apache.pdfbox.cos.COSDictionary.getDictionaryObject(String, String)
          use COSDictionary.getDictionaryObject(COSName, COSName) using COSName constants instead 
org.apache.pdfbox.io.RandomAccessBufferedFileInputStream.getFilePointer()
          use RandomAccessBufferedFileInputStream.getPosition() instead 
org.apache.pdfbox.util.BitFlagHelper.getFlag(COSDictionary, String, int)
          use BitFlagHelper.getFlag(COSDictionary, COSName, int) using COSName constants instead 
org.apache.pdfbox.pdmodel.PDResources.getFonts(Map)
          due to some side effects font caching is no longer supported, use PDResources.getFonts() instead 
org.apache.pdfbox.pdmodel.PDResources.getImages()
          use PDResources.getXObjects() instead, as the images map isn't synchronized with the XObjects map. 
org.apache.pdfbox.cos.COSDocument.getObjectByType(String)
          use COSDocument.getObjectByType(COSName) instead 
org.apache.pdfbox.pdmodel.PDDocument.getOwnerPasswordForEncryption()
          Do not rely on this method anymore. 
org.apache.pdfbox.pdmodel.PDDocument.getPageCount()
          Use the getNumberOfPages method instead! 
org.apache.pdfbox.pdmodel.PDDocument.getPageFormat(int)
          Use the PDPageable adapter class 
org.apache.pdfbox.util.PDFTextStripper.getPageSeparator()
          use PDFTextStripper.getPageStart() and PDFTextStripper.getPageEnd() instead 
org.apache.pdfbox.pdmodel.graphics.xobject.PDPixelMap.getPredictor()
          see FlateFilter 
org.apache.pdfbox.cos.COSDocument.getScratchFile()
          direct access to the scratch file will be removed 
org.apache.pdfbox.cos.COSStream.getScratchFile()
          the direct access to the scratch file will be removed. 
org.apache.pdfbox.pdmodel.PDDocument.getSignatureDictionary()
          use PDDocument.getLastSignatureDictionary() instead. 
org.apache.pdfbox.util.PDFTextStripper.getText(COSDocument)
            
org.apache.pdfbox.pdmodel.common.filespecification.PDComplexFileSpecification.getUnicodeFile()
          use PDComplexFileSpecification.getFileUnicode() instead 
org.apache.pdfbox.pdmodel.PDDocument.getUserPasswordForEncryption()
          Do not rely on this method anymore. 
org.apache.pdfbox.pdmodel.interactive.form.PDSignatureField.getValue()
          use getSignature() instead 
org.apache.pdfbox.util.TextPosition.getWordSpacing()
           
org.apache.pdfbox.pdmodel.common.PDMetadata.importXMPMetadata(XMPMetadata)
           
org.apache.pdfbox.pdmodel.PDDocument.isOwnerPassword(String)
            
org.apache.pdfbox.pdmodel.PDDocument.isUserPassword(String)
            
org.apache.pdfbox.cos.COSDictionary.keyList()
          Use the COSDictionary.entrySet() method instead. 
org.apache.pdfbox.util.TextNormalize.makeLineLogicalOrder(String, boolean)
          isn't used anymore 
org.apache.pdfbox.pdfparser.BaseParser.parseCOSString(boolean)
          Not needed anymore. Use BaseParser.parseCOSString() instead. PDFBOX-1437 
org.apache.pdfbox.pdmodel.PDPage.print(Graphics, PageFormat, int)
          Use the PDPageable adapter class  
org.apache.pdfbox.cos.COSStream.replaceWithStream(COSStream)
          will be removed 
org.apache.pdfbox.pdmodel.interactive.action.type.PDActionURI.setBase(String)
          use PDURIDictionary.setBase(String) instead 
org.apache.pdfbox.pdfviewer.PageDrawer.setClippingPath(int)
          use PageDrawer.setClippingWindingRule(int) instead 
org.apache.pdfbox.util.BitFlagHelper.setFlag(COSDictionary, String, int, boolean)
          use BitFlagHelper.setFlag(COSDictionary, COSName, int, boolean) using COSName constants instead 
org.apache.pdfbox.pdmodel.interactive.viewerpreferences.PDViewerPreferences.setNonFullScreenPageMode(String)
            
org.apache.pdfbox.util.PDFTextStripper.setPageSeparator(String)
          use #setPageStart(String) and {@link #setPageEnd(String)} instead 
org.apache.pdfbox.pdmodel.interactive.viewerpreferences.PDViewerPreferences.setPrintArea(String)
            
org.apache.pdfbox.pdmodel.interactive.viewerpreferences.PDViewerPreferences.setPrintClip(String)
            
org.apache.pdfbox.pdmodel.interactive.viewerpreferences.PDViewerPreferences.setReadingDirection(String)
            
org.apache.pdfbox.pdmodel.interactive.form.PDSignatureField.setValue(String)
          use setSignature(PDSignature) instead 
org.apache.pdfbox.pdmodel.interactive.viewerpreferences.PDViewerPreferences.setViewArea(String)
            
org.apache.pdfbox.pdmodel.interactive.viewerpreferences.PDViewerPreferences.setViewClip(String)
            
org.apache.pdfbox.pdfviewer.PageDrawer.SHFill(COSName)
          use PageDrawer.shFill(COSName) instead. 
org.apache.pdfbox.util.DateConverter.toCalendar(COSString)
          This method throws an IOException for failure. Replace calls to it with DateConverter.toCalendar(String, String[]) and test for failure with (value == null || value.get(Calendar.YEAR) == INVALID_YEAR) 
org.apache.pdfbox.util.DateConverter.toCalendar(String)
          This method throws an IOException for failure. Replace calls to it with DateConverter.toCalendar(String, String[]) using
null
for the second parameter and test for failure with (value == null || value.get(Calendar.YEAR) == INVALID_YEAR)
 
org.apache.pdfbox.pdmodel.PDDocument.wasDecryptedWithOwnerPassword()
          use getCurrentAccessPermission instead 
org.apache.pdfbox.pdmodel.PDDocument.willEncryptWhenSaving()
          Do not rely on this method anymore. It is the responsibility of COSWriter to hold this state 
org.apache.pdfbox.util.ImageIOUtil.writeImage(BufferedImage, String, String, int)
          use ImageIOUtil.writeImage(BufferedImage image, String filename, int dpi), which uses the full filename instead of just the prefix. 
org.apache.pdfbox.util.PDFTextStripper.writeText(COSDocument, Writer)
            
 

Deprecated Constructors
org.apache.pdfbox.pdmodel.common.COSArrayList(E, COSBase, COSDictionary, String)
          use the COSArrayList.COSArrayList(Object, COSBase, COSDictionary, COSName) method instead 
org.apache.pdfbox.cos.COSInteger(int)
          use the static COSInteger.get(long) method instead 
org.apache.pdfbox.cos.COSInteger(long)
          use the static COSInteger.get(long) method instead 
org.apache.pdfbox.cos.COSInteger(String)
          use the static COSInteger.get(long) method instead 
org.apache.pdfbox.cos.COSString(boolean)
          Not needed anymore. Use COSString.COSString() instead. PDFBOX-1437 
org.apache.pdfbox.util.TextPosition(int, float, float, Matrix, float, float, float, float, float, String, PDFont, float, int)
          use TextPosition.TextPosition(int, float, float, Matrix, float, float, float, float, float, String, int[], PDFont, float, int) insetad 
org.apache.pdfbox.util.TextPosition(int, float, float, Matrix, Matrix, float, float, float, String, PDFont, float, int)
          Use TextPosition.TextPosition(int, float, float, Matrix, float, float, float, float, float, String, PDFont, float, int) instead. 
 



Copyright © 2002-2014 The Apache Software Foundation. All Rights Reserved.