Method Summary |
|
public static byte[] | ASCII85Decode(byte in) Decodes a stream that has the ASCII85Decode filter. |
public static byte[] | ASCIIHexDecode(byte in) Decodes a stream that has the ASCIIHexDecode filter. |
public static byte[] | FlateDecode(byte in) Decodes a stream that has the FlateDecode filter. |
public static byte[] | FlateDecode(byte in, boolean strict) A helper to FlateDecode.
Parameters: in - the input data Parameters: strict - true to read a correct stream. |
public static byte[] | LZWDecode(byte in) Decodes a stream that has the LZWDecode filter. |
public PRIndirectReference | addPdfObject(PdfObject obj) |
public void | addViewerPreference(PdfName key, PdfObject value) |
public void | close() |
public byte[] | computeUserPassword() |
public void | consolidateNamedDestinations() Replaces all the local named links with the actual destinations. |
public int | createFakeFontSubsets() Finds all the fonts not subset but embedded and marks them as subset. |
public static byte[] | decodePredictor(byte in, PdfObject dicPar) |
public double | dumpPerc() |
protected static PdfDictionary | duplicatePdfDictionary(PdfDictionary original, PdfDictionary copy, PdfReader newReader) |
protected static PdfObject | duplicatePdfObject(PdfObject original, PdfReader newReader) |
public void | eliminateSharedStreams() Eliminates shared streams if they exist. |
static boolean | equalsn(byte a1, byte a2) |
static boolean | existsName(PdfDictionary dic, PdfName key, PdfName value) |
public AcroFields | getAcroFields() Gets a read-only version of AcroFields . |
public PRAcroForm | getAcroForm() Returns the document's acroform, if it has one. |
public Rectangle | getBoxSize(int index, String boxName) Gets the box size. |
public PdfDictionary | getCatalog() Returns the document's catalog. |
public int | getCertificationLevel() Gets the certification level for this document. |
public Rectangle | getCropBox(int index) Gets the crop box without taking rotation into account. |
public int | getCryptoMode() |
PdfIndirectReference | getCryptoRef() |
PdfEncryption | getDecrypt() |
public int | getEofPos() Gets the byte address of the %%EOF marker. |
public int | getFileLength() Getter for property fileLength. |
static String | getFontName(PdfDictionary dic) |
public HashMap | getInfo() Returns the content of the document information dictionary as a HashMap
of String . |
public String | getJavaScript(RandomAccessFileOrArray file) Gets the global document JavaScript. |
public String | getJavaScript() Gets the global document JavaScript. |
public int | getLastXref() Gets the byte address of the last xref table. |
public ArrayList | getLinks(int page) |
public byte[] | getMetadata() Gets the XML metadata. |
public HashMap | getNamedDestination() Gets all the named destinations as an HashMap . |
public HashMap | getNamedDestinationFromNames() Gets the named destinations from the /Dests key in the catalog as an HashMap . |
public HashMap | getNamedDestinationFromStrings() Gets the named destinations from the /Names key in the catalog as an HashMap . |
public static Rectangle | getNormalizedRectangle(PdfArray box) Normalizes a Rectangle so that llx and lly are smaller than urx and ury. |
public int | getNumberOfPages() Gets the number of pages in the document. |
public byte[] | getPageContent(int pageNum, RandomAccessFileOrArray file) Gets the contents of the page.
Parameters: pageNum - the page number. |
public byte[] | getPageContent(int pageNum) Gets the contents of the page.
Parameters: pageNum - the page number. |
public PdfDictionary | getPageN(int pageNum) Gets the dictionary that represents a page.
Parameters: pageNum - the page number. |
public PdfDictionary | getPageNRelease(int pageNum) |
public PRIndirectReference | getPageOrigRef(int pageNum) Gets the page reference to this page.
Parameters: pageNum - the page number. |
public int | getPageRotation(int index) Gets the page rotation. |
int | getPageRotation(PdfDictionary page) |
public Rectangle | getPageSize(int index) Gets the page size without taking rotation into account. |
public Rectangle | getPageSize(PdfDictionary page) |
public Rectangle | getPageSizeWithRotation(int index) Gets the page size, taking rotation into account. |
public Rectangle | getPageSizeWithRotation(PdfDictionary page) Gets the rotated page from a page dictionary. |
public static PdfObject | getPdfObject(PdfObject obj) Reads a PdfObject resolving an indirect reference
if needed. |
public static PdfObject | getPdfObject(PdfObject obj, PdfObject parent) |
public PdfObject | getPdfObject(int idx) |
public static PdfObject | getPdfObjectRelease(PdfObject obj) |
public static PdfObject | getPdfObjectRelease(PdfObject obj, PdfObject parent) Reads a PdfObject resolving an indirect reference
if needed. |
public PdfObject | getPdfObjectRelease(int idx) |
protected PdfReaderInstance | getPdfReaderInstance(PdfWriter writer) |
public char | getPdfVersion() Gets the PDF version. |
public int | getPermissions() Gets the encryption permissions. |
public RandomAccessFileOrArray | getSafeFile() Gets a new file instance of the original PDF
document. |
public int | getSimpleViewerPreferences() |
public static byte[] | getStreamBytes(PRStream stream, RandomAccessFileOrArray file) Get the content from a stream applying the required filters. |
public static byte[] | getStreamBytes(PRStream stream) Get the content from a stream applying the required filters. |
public static byte[] | getStreamBytesRaw(PRStream stream, RandomAccessFileOrArray file) Get the content from a stream as it is without applying any filter. |
public static byte[] | getStreamBytesRaw(PRStream stream) Get the content from a stream as it is without applying any filter. |
static String | getSubsetPrefix(PdfDictionary dic) |
public PdfDictionary | getTrailer() |
public int | getXrefSize() Gets the number of xref objects. |
public boolean | is128Key() Returns true if the PDF has a 128 bit key encryption. |
public boolean | isAppendable() Getter for property appendable. |
public boolean | isEncrypted() Returns true if the PDF is encrypted. |
public boolean | isHybridXref() Getter for property hybridXref. |
public boolean | isMetadataEncrypted() |
public boolean | isNewXrefType() Getter for property newXrefType. |
final public boolean | isOpenedWithFullPermissions() Checks if the document was opened with the owner password so that the end application
can decide what level of access restrictions to apply. |
public boolean | isRebuilt() Checks if the document had errors and was rebuilt. |
public boolean | isTampered() Checks if the document was changed. |
public static PdfObject | killIndirect(PdfObject obj) Eliminates the reference to the object freeing the memory used by it and clearing
the xref entry.
Parameters: obj - the object. |
protected void | killXref(PdfObject obj) |
protected PdfArray | readArray() |
protected PdfDictionary | readDictionary() |
protected void | readDocObj() |
protected void | readDocObjPartial() |
protected void | readObjStm(PRStream stream, IntHashtable map) |
protected PdfObject | readOneObjStm(PRStream stream, int idx) |
protected PdfObject | readPRObject() |
protected void | readPages() |
protected void | readPdf() |
protected void | readPdfPartial() |
protected PdfObject | readSingleObject(int k) |
protected boolean | readXRefStream(int ptr) |
protected void | readXref() |
protected PdfDictionary | readXrefSection() |
protected void | rebuildXref() |
public void | releaseLastXrefPartial() |
public static void | releaseLastXrefPartial(PdfObject obj) |
public void | releasePage(int pageNum) |
public void | removeAnnotations() Removes all the annotations and fields from the document. |
public void | removeFields() Removes all the fields from the document. |
protected void | removeUnusedNode(PdfObject obj, boolean hits) |
public int | removeUnusedObjects() Removes all the unreachable objects. |
public void | removeUsageRights() Removes any usage rights that this PDF may have. |
public void | resetLastXrefPartial() |
public void | resetReleasePage() |
public void | selectPages(String ranges) Selects the pages to keep in the document. |
public void | selectPages(List pagesToKeep) Selects the pages to keep in the document. |
public void | setAppendable(boolean appendable) Setter for property appendable. |
public void | setPageContent(int pageNum, byte content) Sets the contents of the page.
Parameters: content - the new page content Parameters: pageNum - the page number. |
public void | setTampered(boolean tampered) Sets the tampered state. |
public void | setViewerPreferences(int preferences) Sets the viewer preferences as the sum of several constants. |
void | setViewerPreferences(PdfViewerPreferencesImp vp) |
public int | shuffleSubsetNames() Finds all the font subsets and changes the prefixes to some
random values. |