static
PDFDoc
|
__Create(long impl)
|
long
|
__GetHandle()
|
void
|
addFileAttachment(String file_key, FileSpec embedded_file)
Associates a file attachment with the document.
|
void
|
addHighlights(String hilite)
AddHighlights is used to highlight text in a document using 'Adobe's
Highlight File Format' (Technical Note #5172 ).
|
void
|
addRootBookmark(Bookmark root_bookmark)
Adds/links the specified Bookmark to the root level of document's outline
tree.
|
long
|
addSignatureHandler(SignatureHandler signature_handler)
Adds a signature handler to the signature manager.
|
long
|
addStdSignatureHandler(byte[] pkcs12_keybuffer, String pkcs12_keypass)
Adds a standard (built-in) signature handler to the signature manager.
|
long
|
addStdSignatureHandler(String pkcs12_keyfile, String pkcs12_keypass)
Adds a standard (built-in) signature handler to the signature manager.
|
int
|
appendTextDiff(PDFDoc doc1, PDFDoc doc2)
Imports two external PDFs and highlights the differences between them.
|
int
|
appendTextDiff(PDFDoc doc1, PDFDoc doc2, TextDiffOptions options)
Imports two external PDFs and highlights the differences between them.
|
int
|
appendTextDiff(Page page1, Page page2)
Imports two external pages and highlights the differences between them.
|
void
|
appendVisualDiff(Page p1, Page p2, DiffOptions opts)
Generates a PDF diff of the given pages by overlaying and blending them on top of each other,
then appends that diff as a new page in this document.
|
void
|
close()
Destructor.
|
DigitalSignatureField
|
createDigitalSignatureField()
|
DigitalSignatureField
|
createDigitalSignatureField(String in_sig_field_name)
Creates an unsigned digital signature form field inside the document.
|
Obj
|
createIndirectArray()
Create the indirect array.
|
Obj
|
createIndirectBool(boolean value)
Create the indirect boolean.
|
Obj
|
createIndirectDict()
Create the indirect dictionary
|
Obj
|
createIndirectName(String name)
Create SDF/Cos indirect name
Unlike direct objects, indirect objects can be referenced by more than
one object (i.e.
|
Obj
|
createIndirectNull()
Create the indirect null.
|
Obj
|
createIndirectNumber(double value)
Create the indirect number.
|
Obj
|
createIndirectStream(FilterReader data)
Create the indirect stream.
|
Obj
|
createIndirectStream(FilterReader data, Filter filter_chain)
Create the indirect stream.
|
Obj
|
createIndirectStream(byte[] data)
Create the indirect stream.
|
Obj
|
createIndirectStream(byte[] data, Filter filter_chain)
Create the indirect stream.
|
Obj
|
createIndirectString(byte[] value)
Create the indirect string from buffer
|
Obj
|
createIndirectString(String str)
Create the indirect string.
|
FDFDoc
|
fdfExtract(int extractFlag)
Extract form data and/or annotations to FDF
|
FDFDoc
|
fdfExtract(Annot[] annotations)
Extract annotations to FDF
|
FDFDoc
|
fdfExtract(PageSet pageToExtract, int extractFlag)
Extract form data and/or annotations to FDF
|
FDFDoc
|
fdfExtract()
Extract form data to FDF
|
FDFDoc
|
fdfExtract(ArrayList<Annot> annot_list)
Extract annotations to FDF
|
FDFDoc
|
fdfExtract(ArrayList<Annot> annot_added, ArrayList<Annot> annot_modified, ArrayList<Annot> annot_deleted)
Extract annotations to FDF
|
void
|
fdfMerge(FDFDoc fdf_doc)
Import form data from FDF file to PDF interactive form.
|
void
|
fdfUpdate(FDFDoc fdf_doc)
Replace existing form and annotation data with those imported from the FDF file.
|
Field
|
fieldCreate(String field_name, int type, String field_value)
Create a new interactive form field
|
Field
|
fieldCreate(String field_name, int type, String field_value, String def_field_value)
Create a new interactive form field
|
Field
|
fieldCreate(String field_name, int type)
Create a new interactive form Field.
|
Field
|
fieldCreate(String field_name, int type, Obj field_value)
Create a new interactive form field
|
Field
|
fieldCreate(String field_name, int type, Obj field_value, Obj def_field_value)
Create a new interactive form field
|
void
|
flattenAnnotations(boolean forms_only)
Flatten all annotations in the document.
|
void
|
flattenAnnotations()
Flatten all annotations in the document.
|
void
|
flattenAnnotationsAdvanced(long flags)
|
void
|
flattenAnnotationsAdvanced(FlattenMode[] flattenModes)
Flatten annotations/forms/links in the document.
|
void
|
generateThumbnails(long size)
Generates thumbnail images for all the pages in this PDF document.
|
Obj
|
getAcroForm()
Get the AcroForm Dictionary.
|
DigitalSignatureFieldIterator
|
getDigitalSignatureFieldIterator()
Retrieves an iterator that iterates over digital signature fields.
|
DigitalSignatureField.DocumentPermissions
|
getDigitalSignaturePermissions()
Retrieves the most restrictive document permissions locking level from
all of the signed digital signatures in the document.
|
PDFDocInfo
|
getDocInfo()
Get the document infomation
|
long
|
getDownloadedByteCount()
Returns the number of bytes that have been downloaded, when `hasDownloader()` is True.
|
Field
|
getField(String field_name)
Get the specified field from field name
|
FieldIterator
|
getFieldIterator(String field_name)
Get specified FieldIterator from field name
|
FieldIterator
|
getFieldIterator()
An interactive form (sometimes referred to as an AcroForm) is a
collection of fields for gathering information interactively from the
user.
|
String
|
getFileName()
Get the file name.
|
Bookmark
|
getFirstBookmark()
Get the first bookmark.
|
Config
|
getOCGConfig()
Get the optional group configuration
|
Obj
|
getOCGs()
Get the optional content groups
|
Action
|
getOpenAction()
Get the open action.
|
Page
|
getPage(int page_number)
Get the page object from given page number
|
int
|
getPageCount()
Get the page count.
|
PageIterator
|
getPageIterator(int page_number)
Get the page iterator from given page number
|
PageIterator
|
getPageIterator()
Get the page iterator.
|
PageLabel
|
getPageLabel(int page_num)
Get the specified page label
|
Obj
|
getPages()
Get the pages.
|
Obj
|
getRoot()
Get the root of the document
|
SDFDoc
|
getSDFDoc()
Get the underlying SDFDoc object.
|
SecurityHandler
|
getSecurityHandler()
Get the security handler.
|
SignatureHandler
|
getSignatureHandler(long signature_handler_id)
Gets the associated signature handler instance from the signature manager by looking it up with the handler name.
|
STree
|
getStructTree()
Get the structure tree root
|
long
|
getTotalRemoteByteCount()
Returns the document's total size in bytes, when `HasDownloader()` is True.
|
Obj
|
getTrailer()
Get the document's trailer.
|
Obj
|
getTriggerAction(PDFDoc.ActionTriggerMode triggerMode)
Get the Action associated with the selected PDFDoc Trigger event.
|
Obj
|
getTriggerAction(int trigger)
This method is deprecated.
use INCREMENTAL instead.
Get the Action associated with the selected PDFDoc Trigger event.
|
UndoManager
|
getUndoManager()
|
PDFDocViewPrefs
|
getViewPrefs()
Get the view preferences
|
boolean
|
hasChangesSinceSnapshot()
Call this function to determine whether the document has been modified
since the last Undo/Redo snapshot was taken
|
boolean
|
hasDownloader()
Indicates whether this document was created via the `PDFViewCtrl` method `OpenURLAsync`.
|
boolean
|
hasOC()
Checks for optional content
|
boolean
|
hasRepairedXRef()
Checks whether or not the underlying file has an XRef table that had to be repaired
when the file was opened.
|
boolean
|
hasSignatures()
Indicates whether this documents contains any digital signatures.
|
static
int
|
highlightTextDiff(PDFDoc doc1, PDFDoc doc2, TextDiffOptions options)
Highlights the differences between the external PDFs.
|
Page[]
|
importPages(Page[] pages, boolean import_bookmarks)
Import given pages into current PDFDoc
|
Page[]
|
importPages(Page[] pages)
The function imports a list of pages to this documents.
|
boolean
|
initSecurityHandler(Object custom_data)
Initialize the security handler.
|
boolean
|
initSecurityHandler()
Initializes document's SecurityHandler.
|
boolean
|
initStdSecurityHandler(String password)
Initializes document's SecurityHandler using the supplied password.
|
boolean
|
initStdSecurityHandler(byte[] passwordBuffer)
Initializes document's SecurityHandler using the supplied password.
|
void
|
initializeJSContext()
Initializes the JS context.
|
void
|
insertPages(int insertBeforeThisPage, PDFDoc sourceDoc, int startPage, int endPage, int insertFlag, ProgressMonitor monitor)
|
void
|
insertPages(int insertBeforeThisPage, PDFDoc sourceDoc, int startPage, int endPage, PDFDoc.InsertBookmarkMode insertBookmarkMode, ProgressMonitor monitor)
Inserts a range of pages from specified PDFDoc
|
void
|
insertPages(int insertBeforeThisPage, PDFDoc sourceDoc, PageSet sourcePageSet, int insertFlag, ProgressMonitor monitor)
|
void
|
insertPages(int insertBeforeThisPage, PDFDoc sourceDoc, PageSet sourcePageSet, PDFDoc.InsertBookmarkMode insertBookmarkMode, ProgressMonitor monitor)
Inserts a range of pages from specified PDFDoc using PageSet
|
boolean
|
isEncrypted()
Checks if PDFDoc is encrypted.
|
boolean
|
isLinearized()
Call this function to determine whether the document is represented in
linearized (fast web view) format.
|
boolean
|
isModified()
Call this function to determine whether the document has been modified
since it was last saved.
|
boolean
|
isTagged()
Checks if current document is tagged.
|
void
|
lock()
Locks the document to prevent competing threads from accessiong the
document at the same time.
|
void
|
lockRead()
Locks the document to prevent competing write threads (using lock()) from accessing the document
at the same time.
|
void
|
mergeXFDF(Filter xfdf_contents, String user_id)
Import form data from XFDF contents into this PDF.
|
void
|
mergeXFDF(Filter xfdf_contents, MergeXFDFOptions opts)
Merge existing form and annotation data with those imported from the XFDF file.
|
void
|
mergeXFDFString(String xfdf_contents, MergeXFDFOptions opts)
Merge existing form and annotation data with those imported from the XFDF file.
|
void
|
mergeXFDFString(String xfdf_contents, String user_id)
Import form data from XFDF contents into this PDF.
|
void
|
movePages(int moveBeforeThisPage, PDFDoc sourceDoc, PageSet sourcePageSet, int insertFlag, ProgressMonitor monitor)
This method is deprecated.
use movePages(int, PDFDoc, PageSet, InsertBookmarkMode, ProgressMonitor) instead.
Moves a range of pages from specified PDFDoc. Pages are deleted from
source document after move.
Note: MovePages function does not save sourceDoc. It merely delete pages
in memory. For permanent changes, PDFDoc::Save should be used to
save sourceDoc after function exists.
|
void
|
movePages(int moveBeforeThisPage, PDFDoc sourceDoc, PageSet sourcePageSet, PDFDoc.InsertBookmarkMode insertBookmarkMode, ProgressMonitor monitor)
Moves a range of pages from specified PDFDoc.
|
void
|
movePages(int moveBeforeThisPage, PDFDoc sourceDoc, int startPage, int endPage, PDFDoc.InsertBookmarkMode insertBookmarkMode, ProgressMonitor monitor)
Moves a range of pages from specified PDFDoc.
|
void
|
movePages(int moveBeforeThisPage, PDFDoc sourceDoc, int startPage, int endPage, int insertFlag, ProgressMonitor monitor)
This method is deprecated.
use #movePages(int, PDFDoc, PDFDoc, int, int, InsertBookmarkMode, ProgressMonitor) instead.
Moves a range of pages from specified PDFDoc. Pages are deleted from
source document after move.
Note: MovePages function does not save sourceDoc. It merely delete pages
in memory. For permanent changes, PDFDoc::Save should be used to
save sourceDoc after function exists.
|
Page
|
pageCreate(Rect media_box)
Create page with given media box
|
Page
|
pageCreate()
Create a new, empty page in the document.
|
void
|
pageInsert(PageIterator where, Page page)
Insert/Import a single page at a specific location in the page sequence.
|
void
|
pagePushBack(Page page)
Adds a page to the end of a documents's page sequence.
|
void
|
pagePushFront(Page page)
Adds a page to the beginning of a documents's page sequence.
|
void
|
pageRemove(PageIterator page_itr)
Remove specified page
|
void
|
refreshAnnotAppearances(RefreshOptions opts)
Generates the appearance stream for annotations in the document using the specified options.
|
void
|
refreshAnnotAppearances()
Generates the appearance stream for annotations in the document using the default options.
|
void
|
refreshFieldAppearances()
Regenerates the appearance stream for every widget annotation in the
document Call this method if you modified field's value and would like to
update field's appearances.
|
void
|
removePageLabel(int page_num)
Removes the page label that is attached to the specified page,
effectively merging the specified range with the previous page label
sequence.
|
void
|
removeSecurity()
Removes all security for the document.
|
void
|
removeSignatureHandler(long signature_handler_id)
Removes a signature handler from the signature manager.
|
void
|
save(Filter output_filter, long flags)
This method is deprecated.
use save(Filter, SDFDoc.SaveMode) instead.
Saves the document to a CustomFilter.
Note: Save will modify the PDFDoc object's internal
representation. As such, the user should acquire a write lock
before calling save.
|
void
|
save(OutputStream stream, SaveMode[] saveModes, ProgressMonitor progress)
Saves the document to an OutputStream.
|
byte[]
|
save(SaveMode[] saveModes, ProgressMonitor progress)
Saves the document to a memory buffer.
|
void
|
save(long flags)
This method is deprecated.
use save() instead.
Saves the document incrementally to the same location as it was opened from.
This function only works if the PDFDoc was opened using a FileDescriptorFilter.
Note: If the original pdf has a corrupt xref table (see HasRepairedXref or
http://www.pdftron.com/kb_corrupt_xref), then this save can not be used.
|
byte[]
|
save(SDFDoc.SaveMode saveMode, ProgressMonitor progress)
Saves the document to a memory buffer.
|
byte[]
|
save(long flags, ProgressMonitor progress)
This method is deprecated.
use save(SDFDoc.SaveMode, ProgressMonitor) instead.
Saves the document to a memory buffer.
Note: - Save will modify the PDFDoc object's internal representation. As such,
the user should acquire a write lock before calling save.
|
void
|
save(OutputStream stream, SDFDoc.SaveMode saveMode, ProgressMonitor progress, int size)
Saves the document to an OutputStream.
|
void
|
save(OutputStream stream, long flags, ProgressMonitor progress)
This method is deprecated.
use save(OutputStream, SDFDoc.SaveMode, ProgressMonitor) instead.
Saves the document to an OutputStream.
Note: - Save will modify the PDFDoc object's internal representation. As such,
the user should acquire a write lock before calling save.
|
void
|
save(OutputStream stream, SDFDoc.SaveMode saveMode, ProgressMonitor progress)
Saves the document to an OutputStream.
|
void
|
save(OutputStream stream, long flags, ProgressMonitor progress, int size)
|
void
|
save(String path, long flags, ProgressMonitor progress)
This method is deprecated.
use save(String, SDFDoc.SaveMode, ProgressMonitor) instead.
Saves the document to a file.
If a full save is requested to the original path, the file is saved to a
file system-determined temporary file, the old file is deleted, and the
temporary file is renamed to path.
A full save with remove unused or linearization option may re-arrange
object in the cross reference table. Therefore all pointers and
references to document objects and resources should be re acquired in
order to continue document editing.
In order to use incremental save the specified path must match original
path and e_incremental flag bit should be set.
Note: In a multi-threaded environment, the user is expected to acquire
a write lock before attempting to save the document.
Note: - Save will modify the PDFDoc object's internal representation. As such,
the user should acquire a write lock before calling save.
Note: - If the original pdf has a corrupt xref table (see HasRepairedXref or
http://www.pdftron.com/kb_corrupt_xref), then it can not be saved using the e_incremental flag.
|
void
|
save(String path, SaveMode[] saveModes, ProgressMonitor progress)
Saves the document to a file.
|
void
|
save(String path, SDFDoc.SaveMode saveMode, ProgressMonitor progress)
Saves the document to a file.
|
void
|
save(Filter output_filter, SDFDoc.SaveMode saveMode)
Saves the document to a CustomFilter.
|
void
|
save(OutputStream stream, SaveMode[] saveModes, ProgressMonitor progress, int size)
Saves the document to an OutputStream.
|
void
|
save()
Saves the document incrementally to the same location as it was opened from.
|
void
|
save(Filter output_filter, SaveMode[] saveModes)
Saves the document to a file.
|
void
|
saveCustomSignature(byte[] in_signature, DigitalSignatureField in_field, Filter output_filter)
Saves a custom signature Contents to a document which has been prepared to receive it.
|
void
|
saveCustomSignature(byte[] in_signature, DigitalSignatureField in_field, String in_path)
Saves a custom signature Contents to a document which has been prepared to receive it.
|
boolean
|
saveIncrementalData(String path)
Saves only the incremental portion of the PDFDoc to path
Works like saving using INCREMENTAL but only
writes the portion that would have been appended to path.
|
void
|
saveViewerOptimized(String path, ViewerOptimizedOptions opts)
Applies optimizations to improve viewing speed and saves the document to the specified file.
|
byte[]
|
saveViewerOptimized(ViewerOptimizedOptions opts)
Applies optimizations to improve viewing speed and saves the document to a memory buffer.
|
void
|
setOpenAction(Action action)
Set the Action that will be triggered when the document is opened.
|
void
|
setPageLabel(int page_num, PageLabel label)
Attaches a label to a page.
|
void
|
setSecurityHandler(SecurityHandler handler)
The function sets a new SecurityHandler as the current security handler.
|
boolean
|
timedLock(int milliseconds)
Try locking the document, waiting no longer than specified number of
milliseconds.
|
boolean
|
timedLockRead(int milliseconds)
Tries to obtain a read lock the document for milliseconds duration, and returns
true if the lock was successfully acquired
|
boolean
|
tryLock()
Try locking the document in non-blocking manner.
|
boolean
|
tryLockRead()
Try obtaining a read lock on the document in non-blocking manner.
|
void
|
unlock()
Unlock the document.
|
void
|
unlockRead()
Removes the read lock from the document.
|
PDFDoc.SignaturesVerificationStatus
|
verifySignedDigitalSignatures(VerificationOptions in_opts)
Attempts to verify all signed cryptographic digital signatures in the document, ignoring unsigned signatures.
|