Class CosDocument
java.lang.Object
com.adobe.internal.pdftoolkit.core.cos.CosDocument
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close theCosDocument
and free any resources associated with it.Creates a new, empty COS array object.createCosArray
(int directStatus) Creates a new, empty COS array object.createCosArray
(ArrayList array) Creates a new COS array object and populates it with the specified ArrayList of CosObjects.createCosArray
(ArrayList array, int directStatus) Creates a new COS array object and populates it with the specified ArrayList of CosObjects.Creates a new COS array object and populates it with the specified ArrayList of non CosObjects.createCosArrayFromNonCosData
(ArrayList array, int directStatus) Creates a new COS array object and populates it with the specified ArrayList of non CosObjects.createCosBoolean
(boolean value) Create a new CosBoolean instance (always a direct object)createCosBoolean
(Boolean value) Create a new CosBoolean instance (always a direct object)Creates an empty COS dictionary.createCosDictionary
(int directStatus) Creates an empty COS dictionary.createCosDictionary
(Map cosData) Creates a COS dictionary from a Map of Cos objects.createCosDictionary
(Map cosData, int directStatus) Creates a COS dictionary from a Map of Cos objects based on the value of the directStatus enum.createCosDictionaryFromNonCosData
(Map javaMap) Creates a COS dictionary from non CosObject data.createCosDictionaryFromNonCosData
(Map data, int directStatus) Constructs COS dictionary from the HashMap that contains non-Cos object values.createCosName
(ASName value) Creates a COS name object corresponding to the specified atom.Creates a COS null object.createCosNumeric
(byte[] inputRep) Creates a COS numeric value object.createCosNumeric
(double value) Creates a COS numeric value object.createCosNumeric
(int value) Creates a COS numeric value object.createCosNumeric
(long value) Creates a COS numeric value object.createCosNumeric
(CosNumeric source) Creates a COS numeric value object.createCosNumeric
(Number value) Creates a COS numeric value object.Create a new, initialized CosObjectStream instanceCreates a COS stream with an empty stream data.Creates a CosStream object.createCosString
(byte[] value) Creates a COS string object.createCosString
(ASString value) Creates a COS string object.createCosString
(String value) Creates a COS string object.Creates an empty COS dictionary.createDirectCosDictionary
(Map cosData) Creates a COS dictionary from a Map of Cos objects.Creates a COS dictionary from non CosObject data.createHexCosString
(byte[] value) Creates a COS hex string object.createHexCosString
(ASString value) Creates a COS hex string object.createHexCosString
(String value) Creates a COS hex string object.Creates a new, empty COS array object.createIndirectCosArray
(ArrayList array) Creates a new COS array object and populates it with the specified ArrayList of CosObjects.Creates a new COS array object and populates it with the specified ArrayList of non CosObjects.finish()
void
Parse the document to identify and remove duplicate resources referenced in the page resource object trees.boolean
Explicit early cleanup of unreferenced objects as done in full save.getChangedObjects
(long eof) Return CosLIst of objects added, deleted, or changed since EOF value.long
getEOF()
Returns pointer to FDFDocumentlong
int
Return the count of trash bytes that appear before the document header.getIndirectObjectByNumber
(int objNum) Return an indirect CosObject instance corresponding to an object number.getIndirectObjectInfoByNumber
(int objNum) Return an indirect CosObjectInfo instance corresponding to an object number.getInfo()
Retrieves the Information CosDictionary of the document, may be null.static String
int
int
Get total number of revisions for this document.long
Return EOF of object's update section or zero if cannot be determined.int
getObjRevision
(CosObject obj) Return index of object's update section or -1 if cannot be determined.Returns the version string of the PDF file (e.g.Gets pointer to PDFDocumentgetRoot()
Retrieves the root CosDictionary of the document if it's not already cached; otherwise, returns the cached root.Obtain a slice of the underlying InputByteStream for the document.getStream
(long start, long length) Obtain a slice of the underlying InputByteStream for the document.Get theStreamManager
to use for this document.Retrieves the trailer from the document.int
Return the count of trash bytes that appear after the document trailer.Return an array of unreferenced indirect objects in this document.int
Get the current XRef typeboolean
boolean
isDirty()
Is the document dirty?boolean
boolean
Returns true iff the document is currently linearized.boolean
void
boolean
Mark document as not dirty.static CosDocument
newDocument
(ByteReader byteReader, CosOpenOptions options) Returns an empty document with some initialized data structures so that you can build a new CosDocument.static CosDocument
newDocument
(CosOpenOptions options) Returns an empty document with some initialized data structures so that you can build a new CosDocument.static CosDocument
newDocument
(PDFCore pdfCore) Once a CosDocument was instanciated from a PDFCore object, that PDFCore object can't be used again.void
save
(ByteWriter byteWriter, CosSaveParams params) Perform an save with previously specified save stylevoid
setFDFDocument
(Object fdfDocument) Sets pointer to FDFDocumentstatic void
setLoggingPath
(String loggingPath) void
setNextIncrementalSectionOffset
(long nextIncrementalSectionOffset) Sets the offset where next incremental section shall be written if the document is saved incrementally.void
setPDFDocument
(Object pdfdocument) Sets pointer to PDFDocumentvoid
setToSaveExtensions
(Map extensions) void
setToSaveVersion
(String version) void
setUseRepairList
(boolean useRepairList) For some API's such as PDF/A validation Gibson needs to work on original cos objects and ignore repairs made to cos objects.boolean
Returns true iff the BASE document was a linearized document, but later suffered incremental updates that spoil its perfect order.boolean
-
Method Details
-
newDocument
public static CosDocument newDocument(ByteReader byteReader, CosOpenOptions options) throws PDFCosParseException, PDFIOException, PDFSecurityException Returns an empty document with some initialized data structures so that you can build a new CosDocument.- Parameters:
byteReader
- the PDF data for the documentoptions
- the options to provide for the new document- Throws:
PDFCosParseException
PDFIOException
PDFSecurityException
-
newDocument
public static CosDocument newDocument(CosOpenOptions options) throws PDFCosParseException, PDFIOException, PDFSecurityException Returns an empty document with some initialized data structures so that you can build a new CosDocument.- Parameters:
options
- the options to provide for the new document- Throws:
PDFCosParseException
PDFIOException
PDFSecurityException
-
newDocument
public static CosDocument newDocument(PDFCore pdfCore) throws PDFCosParseException, PDFIOException, PDFSecurityException Once a CosDocument was instanciated from a PDFCore object, that PDFCore object can't be used again. You can generate a new PDFCore object by calling CosDocument.finish().- Parameters:
pdfCore
-- Returns:
- CosDocument from the input PDFCore.
- Throws:
PDFCosParseException
PDFIOException
PDFSecurityException
-
getStreamManager
Get theStreamManager
to use for this document.- Returns:
- the stream manager for this document
-
finish
- Returns:
- new PDFCore which can be used to reinstantiate a CosDocument
-
close
Close theCosDocument
and free any resources associated with it. -
getOriginalVersion
public String getOriginalVersion() throws PDFCosParseException, PDFIOException, PDFSecurityExceptionReturns the version string of the PDF file (e.g. "1.5"). This string is typically found in the header of the file. However, the version also can be an entry in the catalog; if the version is more recent and the file has been saved incrementally, the version entry in the catalog overrides the header. A newly created document will not have a header yet, and the version information will either have to be put in the catalog or supplied explicitly to the save routine when the document is first written. The version string is discussed in sections 3.4.1 and H.1 of the PDF Reference Manual version 1.4.- Returns:
- PDF file version string.
- Throws:
PDFCosParseException
PDFIOException
PDFSecurityException
-
procureOriginalVersion
public String procureOriginalVersion() throws PDFCosParseException, PDFIOException, PDFSecurityException -
getToSaveExtensions
-
setToSaveExtensions
-
isToSaveExtensionsInitialized
public boolean isToSaveExtensionsInitialized() -
getToSaveVersion
-
setToSaveVersion
-
procureToSaveVersion
public String procureToSaveVersion() throws PDFCosParseException, PDFIOException, PDFSecurityException -
getTrailer
Retrieves the trailer from the document.- Returns:
- Document's trailer dictionary.
-
getTrailerList
-
getRoot
Retrieves the root CosDictionary of the document if it's not already cached; otherwise, returns the cached root.- Returns:
- Document's Root dictionary
- Throws:
PDFCosParseException
PDFIOException
PDFSecurityException
-
getInfo
Retrieves the Information CosDictionary of the document, may be null.- Returns:
- Document's Information dictionary
- Throws:
PDFCosParseException
PDFIOException
PDFSecurityException
-
getStream
Obtain a slice of the underlying InputByteStream for the document. This slice belongs to the caller of this method and must be closed by them when they are finished with it.- Parameters:
start
- the offset in theCosDocument
'sInputByteStream
to use as the start of the returned slicelength
- the length of the slice to create- Returns:
- A slice of the underlying InputByteStream for the document.
- Throws:
PDFIOException
-
getStream
Obtain a slice of the underlying InputByteStream for the document. This slice belongs to the caller of this method and must be closed by them when they are finished with it.- Returns:
- A slice of the underlying InputByteStream for the document.
- Throws:
PDFIOException
-
getNumObjects
public int getNumObjects() -
getOptions
-
isLinearized
public boolean isLinearized()Returns true iff the document is currently linearized. To say that a document is "linearized" in PDF means it has been put into the special order and has NOT been modified since then. -
wasLinearized
public boolean wasLinearized()Returns true iff the BASE document was a linearized document, but later suffered incremental updates that spoil its perfect order. So if isLinearized() returns false but wasLinearized() returns true you are dealing with a document that was linear saved and has not been full saved since then but that HAS had one or more incremental update sections applied to it. -
wasRepaired
public boolean wasRepaired() -
getRepairTypes
-
setFDFDocument
Sets pointer to FDFDocument- Parameters:
fdfDocument
- FDFDocument to set
-
getFdfDocument
Returns pointer to FDFDocument- Returns:
- Object
-
setPDFDocument
Sets pointer to PDFDocument- Parameters:
pdfdocument
- PDFDocument to set
-
getPdfDocument
Gets pointer to PDFDocument- Returns:
- Object
-
freeDuplicateResources
public void freeDuplicateResources() throws PDFCosParseException, PDFIOException, PDFSecurityExceptionParse the document to identify and remove duplicate resources referenced in the page resource object trees.Note: This method must be explicitly invoked by the client prior to save. It should only be invoked before full save and linear save.
-
freeUnreferencedObjects
public boolean freeUnreferencedObjects() throws PDFCosParseException, PDFIOException, PDFSecurityExceptionExplicit early cleanup of unreferenced objects as done in full save. returns true if at least one object is freed. -
getUnreferencedObjects
public CosObject[] getUnreferencedObjects() throws PDFCosParseException, PDFIOException, PDFSecurityExceptionReturn an array of unreferenced indirect objects in this document. -
save
public void save(ByteWriter byteWriter, CosSaveParams params) throws PDFCosParseException, PDFInvalidParameterException, PDFIOException, PDFSecurityException Perform an save with previously specified save style- Parameters:
byteWriter
- for writing the PDF document toparams
- indicating save style- Throws:
PDFCosParseException
PDFInvalidParameterException
PDFIOException
PDFSecurityException
-
setLoggingPath
-
getLoggingPath
-
getInPlaceByteWriter
-
getByteReader
- Returns:
ByteReader
-
setNextIncrementalSectionOffset
public void setNextIncrementalSectionOffset(long nextIncrementalSectionOffset) Sets the offset where next incremental section shall be written if the document is saved incrementally.- Parameters:
nextIncrementalSectionOffset
-
-
isCacheEnabled
public boolean isCacheEnabled() -
isEncrypted
public boolean isEncrypted() -
getEncryption
-
getIndirectObjectByNumber
public CosObject getIndirectObjectByNumber(int objNum) throws PDFCosParseException, PDFIOException, PDFSecurityException Return an indirect CosObject instance corresponding to an object number. If this CosDocument instance is not already caching the CosObject, use the XRef table (if there are entries) to locate the object in the input stream and parse it. Cache it for future references.- Parameters:
objNum
- Indirect object number of COS object whose byte location is desired- Returns:
- CosObject parsed result. Returns null if object doesn't exist or if the object entry in the XRef is marked free.
- Throws:
PDFCosParseException
PDFIOException
PDFSecurityException
-
getIndirectObjectInfoByNumber
public CosObjectInfo getIndirectObjectInfoByNumber(int objNum) throws PDFCosParseException, PDFIOException, PDFSecurityException Return an indirect CosObjectInfo instance corresponding to an object number. If this CosDocument instance is not already caching the CosObjectInfo, use the XRef table (if there are entries) to look it up and cache it for future references. -
getObjEOF
Return EOF of object's update section or zero if cannot be determined. -
getObjRevision
Return index of object's update section or -1 if cannot be determined. -
getHeaderTrashCount
public int getHeaderTrashCount()Return the count of trash bytes that appear before the document header. -
getTrailerTrashCount
public int getTrailerTrashCount()Return the count of trash bytes that appear after the document trailer. -
getNumRevisions
public int getNumRevisions()Get total number of revisions for this document. -
getFileSize
- Returns:
- the length of the underly buffer in bytes
- Throws:
PDFIOException
-
getChangedObjects
public CosList getChangedObjects(long eof) throws PDFCosParseException, PDFIOException, PDFSecurityException Return CosLIst of objects added, deleted, or changed since EOF value. -
markDirty
public void markDirty() -
isDirty
public boolean isDirty()Is the document dirty?- Returns:
true
if the document is dirty;false
otherwise
-
markNotDirty
public boolean markNotDirty()Mark document as not dirty.- Returns:
- previous dirty state
-
getEOF
- Throws:
PDFIOException
-
getXRefType
public int getXRefType()Get the current XRef type -
createCosArray
public CosArray createCosArray(ArrayList array, int directStatus) throws PDFCosParseException, PDFIOException, PDFSecurityException Creates a new COS array object and populates it with the specified ArrayList of CosObjects. The created CosArray container can be made direct or indirect by setting the directStatus flag.- Parameters:
array
- - ArrayList of CosObjects that becomes the data in the new CosArray object- Returns:
- A newly created CosArray.
- Throws:
PDFCosParseException
PDFIOException
PDFSecurityException
-
createIndirectCosArray
public CosArray createIndirectCosArray(ArrayList array) throws PDFCosParseException, PDFIOException, PDFSecurityException Creates a new COS array object and populates it with the specified ArrayList of CosObjects. The created CosArray container will be INDIRECT.- Parameters:
array
- - ArrayList of CosObjects that becomes the data in the new CosArray object- Returns:
- A newly created CosArray.
- Throws:
PDFCosParseException
PDFIOException
PDFSecurityException
-
createCosArray
public CosArray createCosArray(ArrayList array) throws PDFCosParseException, PDFIOException, PDFSecurityException Creates a new COS array object and populates it with the specified ArrayList of CosObjects. The created CosArray container will be DIRECT.- Parameters:
array
- - ArrayList of CosObjects that becomes the data in the new CosArray object- Returns:
- A newly created CosArray.
- Throws:
PDFCosParseException
PDFIOException
PDFSecurityException
-
createCosArrayFromNonCosData
public CosArray createCosArrayFromNonCosData(ArrayList array, int directStatus) throws PDFCosParseException, PDFIOException, PDFSecurityException Creates a new COS array object and populates it with the specified ArrayList of non CosObjects. The created CosArray container can be made direct or indirect by setting the directStatus flag.- Parameters:
array
- - ArrayList of non CosObjects that becomes the data in the new CosArray object- Returns:
- A newly created CosArray.
- Throws:
PDFCosParseException
PDFIOException
PDFSecurityException
-
createIndirectCosArrayFromNonCosData
public CosArray createIndirectCosArrayFromNonCosData(ArrayList array) throws PDFCosParseException, PDFIOException, PDFSecurityException Creates a new COS array object and populates it with the specified ArrayList of non CosObjects. The created CosArray container will be INDIRECT.- Parameters:
array
- - ArrayList of non CosObjects that becomes the data in the new CosArray object- Returns:
- A newly created CosArray.
- Throws:
PDFCosParseException
PDFIOException
PDFSecurityException
-
createCosArrayFromNonCosData
public CosArray createCosArrayFromNonCosData(ArrayList array) throws PDFCosParseException, PDFIOException, PDFSecurityException Creates a new COS array object and populates it with the specified ArrayList of non CosObjects. The created CosArray container will be DIRECT.- Parameters:
array
- - ArrayList of non CosObjects that becomes the data in the new CosArray object- Returns:
- A newly created CosArray.
- Throws:
PDFCosParseException
PDFIOException
PDFSecurityException
-
createCosArray
public CosArray createCosArray(int directStatus) throws PDFCosParseException, PDFIOException, PDFSecurityException Creates a new, empty COS array object. Array will be direct or indirect depending on the value of the directStatus enum.- Returns:
- A newly allocated COS array.
- Throws:
PDFCosParseException
PDFIOException
PDFSecurityException
-
createIndirectCosArray
public CosArray createIndirectCosArray() throws PDFCosParseException, PDFIOException, PDFSecurityExceptionCreates a new, empty COS array object. Array will be INDIRECT.- Returns:
- A newly allocated COS array.
- Throws:
PDFCosParseException
PDFIOException
PDFSecurityException
-
createCosArray
Creates a new, empty COS array object. Array will be DIRECT.- Returns:
- A newly allocated COS array.
- Throws:
PDFCosParseException
PDFIOException
PDFSecurityException
-
createCosBoolean
Create a new CosBoolean instance (always a direct object)- Parameters:
value
- - boolean value attribute of the instance- Returns:
- - CosBoolean new instance
-
createCosBoolean
Create a new CosBoolean instance (always a direct object)- Parameters:
value
- - Boolean value attribute of the instance- Returns:
- - CosBoolean new instance
-
createCosDictionary
public CosDictionary createCosDictionary(int directStatus) throws PDFCosParseException, PDFIOException, PDFSecurityException Creates an empty COS dictionary. Based on direct status enum, this will be created as either an INDIRECT object (can be referenced and entered in the xref)or as a DIRECT object.- Returns:
- Newly allocated COS dictionary.
- Throws:
PDFCosParseException
PDFIOException
PDFSecurityException
-
createCosDictionary
public CosDictionary createCosDictionary() throws PDFCosParseException, PDFIOException, PDFSecurityExceptionCreates an empty COS dictionary. This will be created as an INDIRECT object (can be referenced and entered in the xref).- Returns:
- Newly allocated COS dictionary.
- Throws:
PDFCosParseException
PDFIOException
PDFSecurityException
-
createDirectCosDictionary
public CosDictionary createDirectCosDictionary() throws PDFCosParseException, PDFIOException, PDFSecurityExceptionCreates an empty COS dictionary. This will be created as a DIRECT object (cannot be referenced or entered in the xref).- Returns:
- Newly allocated COS dictionary.
- Throws:
PDFCosParseException
PDFIOException
PDFSecurityException
-
createCosDictionary
public CosDictionary createCosDictionary(Map cosData, int directStatus) throws PDFCosParseException, PDFIOException, PDFSecurityException Creates a COS dictionary from a Map of Cos objects based on the value of the directStatus enum.- Parameters:
cosData
- Map of Cos objects with ASName keys- Returns:
- Newly allocated COS dictionary.
- Throws:
PDFCosParseException
PDFIOException
PDFSecurityException
-
createCosDictionary
public CosDictionary createCosDictionary(Map cosData) throws PDFCosParseException, PDFIOException, PDFSecurityException Creates a COS dictionary from a Map of Cos objects. This will be created as an INDIRECT object (can be referenced and entered in the xref).- Parameters:
cosData
- Map of Cos objects with ASName keys- Returns:
- Newly allocated COS dictionary.
- Throws:
PDFCosParseException
PDFIOException
PDFSecurityException
-
createDirectCosDictionary
public CosDictionary createDirectCosDictionary(Map cosData) throws PDFCosParseException, PDFIOException, PDFSecurityException Creates a COS dictionary from a Map of Cos objects. This will be created as a DIRECT object (cannot be referenced or entered in the xref).- Parameters:
cosData
- Map of Cos objects with ASName keys- Returns:
- Newly allocated COS dictionary.
- Throws:
PDFCosParseException
PDFIOException
PDFSecurityException
-
createCosDictionaryFromNonCosData
public CosDictionary createCosDictionaryFromNonCosData(Map data, int directStatus) throws PDFCosParseException, PDFIOException, PDFSecurityException Constructs COS dictionary from the HashMap that contains non-Cos object values. The keys are assumed to be strings and not ASNames. For the values, Boolean gets translated to CosBoolean, Number to CosNumeric, Byte Array to CosString, String to CosName, HashMap to CosDictionary and ArrayList to CosArray. Any other type gets translated to null and is skipped. The strings are converted to ASNames. This uses CosDictionary's put method to insure that the direct object values get the parent dictionary's ID set. Each entry in HashMap and ArrayList gets recursively translated under the same rules.- Parameters:
data
- - a Map with string key - non-CosObject value pairs- Throws:
PDFCosParseException
PDFIOException
PDFSecurityException
-
createCosDictionaryFromNonCosData
public CosDictionary createCosDictionaryFromNonCosData(Map javaMap) throws PDFCosParseException, PDFIOException, PDFSecurityException Creates a COS dictionary from non CosObject data. Boolean gets translated to CosBoolean, Number to CosNumeric, Byte Array to CosString, String to CosName, HashMap to CosDictionary and ArrayList to CosArray. Any other type gets translated to null and is skipped. Each entry in HashMap and ArrayList gets recursively translated under the same rules. This dictionary will be created as an INDIRECT object (can be referenced and entered in the xref).- Parameters:
javaMap
- - Map with strings as keys, nonCos objects as data- Throws:
PDFCosParseException
PDFIOException
PDFSecurityException
-
createDirectCosDictionaryFromNonCosData
public CosDictionary createDirectCosDictionaryFromNonCosData(Map javaMap) throws PDFCosParseException, PDFIOException, PDFSecurityException Creates a COS dictionary from non CosObject data. Boolean gets translated to CosBoolean, Number to CosNumeric, Byte Array to CosString, String to CosName, HashMap to CosDictionary and ArrayList to CosArray. Any other type gets translated to null and is skipped. Each entry in HashMap and ArrayList gets recursively translated under the same rules. This dictionary will be created as a DIRECT object (cannot be referenced or entered in the xref).- Parameters:
javaMap
- - Map with strings as keys, nonCos objects as data- Throws:
PDFCosParseException
PDFIOException
PDFSecurityException
-
createCosName
Creates a COS name object corresponding to the specified atom.- Parameters:
value
- Atom to be wrapped by a COS name object- Returns:
- Newly allocated COS name object.
-
createCosNull
Creates a COS null object.- Returns:
- Newly allocated COS null object.
-
createCosNumeric
Creates a COS numeric value object.- Parameters:
value
- Integer value for the object- Returns:
- Newly allocated COS numeric object initialized with the specified value.
-
createCosNumeric
Creates a COS numeric value object.- Parameters:
value
- Integer value for the object- Returns:
- Newly allocated COS numeric object initialized with the specified value.
-
createCosNumeric
Creates a COS numeric value object.- Parameters:
value
- Integer value for the object- Returns:
- Newly allocated COS numeric object initialized with the specified value.
-
createCosNumeric
Creates a COS numeric value object.- Parameters:
value
- Floating point value for the object- Returns:
- Newly allocated COS numeric object initialized with the specified value.
-
createCosNumeric
Creates a COS numeric value object.- Parameters:
inputRep
- byte string value for the object- Returns:
- Newly allocated COS numeric object initialized with the specified value.
- Throws:
PDFCosParseException
-
createCosNumeric
public CosNumeric createCosNumeric(CosNumeric source) throws PDFCosParseException, PDFIOException, PDFSecurityException Creates a COS numeric value object.- Parameters:
source
- CosNumeric object to copy- Returns:
- Newly allocated COS numeric object initialized with the specified value.
- Throws:
PDFCosParseException
PDFIOException
PDFSecurityException
-
createCosObjectStream
public CosObjectStream createCosObjectStream() throws PDFCosParseException, PDFIOException, PDFSecurityExceptionCreate a new, initialized CosObjectStream instance -
createCosStream
public CosStream createCosStream() throws PDFCosParseException, PDFIOException, PDFSecurityExceptionCreates a COS stream with an empty stream data. The filter information must be set in the dictionary portion of the stream before obtaining the output stream that writes into the stream data. CosStreams must always be indirect objects.- Returns:
- newly allocated COS stream.
- Throws:
PDFCosParseException
PDFIOException
PDFSecurityException
-
createCosStream
public CosStream createCosStream(InputByteStream data) throws PDFCosParseException, PDFIOException, PDFSecurityException Creates a CosStream object.- Parameters:
data
- Data for the string- Returns:
- Newly allocated CosStream object initialized with the specified data.
- Throws:
PDFCosParseException
PDFIOException
PDFSecurityException
-
createCosString
Creates a COS string object.- Parameters:
value
- Data for the string- Returns:
- Newly allocated COS string object initialized with the specified data.
-
createCosString
Creates a COS string object.- Parameters:
value
- Data for the string- Returns:
- Newly allocated COS string object initialized with the specified data.
-
createCosString
Creates a COS string object.- Parameters:
value
- String. NOTE this String must be in PDFDocEncoding.- Returns:
- Newly allocated COS string object initialized with the specified data.
-
createHexCosString
Creates a COS hex string object.- Parameters:
value
- Data for the string- Returns:
- Newly allocated COS string object initialized with the specified data.
-
createHexCosString
Creates a COS hex string object.- Parameters:
value
- Data for the string- Returns:
- Newly allocated COS string object initialized with the specified data.
-
createHexCosString
Creates a COS hex string object.- Parameters:
value
- Data for the string- Returns:
- Newly allocated COS string object initialized with the specified data.
-
setUseRepairList
public void setUseRepairList(boolean useRepairList) For some API's such as PDF/A validation Gibson needs to work on original cos objects and ignore repairs made to cos objects. This flag is set to false for such operations. However this should be reset once that operation is done, so that for further operations on the document repair list cab be used. Default value is true.- Parameters:
useRepairList
-
-