PDFDoc Class |
Namespace: pdftron.PDF
The PDFDoc type exposes the following members.
Name | Description | |
---|---|---|
PDFDoc |
Creates a new empty PDF document.
| |
PDFDoc(Byte) |
Creates a new PDF document from an array of bytes.
| |
PDFDoc(String) |
Creates a new PDF document from the specified full path of the file.
| |
PDFDoc(IStorageFile) |
Creates a new PDF document from an IStorageFile instance.
| |
PDFDoc(IBuffer) |
Creates a new PDF document from a buffer.
| |
PDFDoc(IInputStream) |
Creates a new PDF document from an IInputStream instance.
| |
PDFDoc(IRandomAccessStream) |
Creates a new PDF document from an IRandomAccessStream instance.
| |
PDFDoc(IFilter) |
Creates a new PDF document from an existing IFilter instance.
| |
PDFDoc(SDFDoc) |
Creates a new PDF document from an existing SDFDoc instance.
| |
PDFDoc(IInputStream, String) |
Creates a new PDF document from an IInputStream instance.
| |
PDFDoc(IRandomAccessStream, String) |
Creates a new PDF document from an IRandomAccessStream instance.
|
Name | Description | |
---|---|---|
AddFileAttachment | ||
AddHighlights | AddHighlights is used to highlight text in a document using 'Adobe's Highlight
File Format' (Technical Note #5172). The method will parse the Character offset data
and modify the current document by adding new highlight annotations.
| |
AddRootBookmark | ||
AddSignatureHandler |
Adds a signature handler to the signature manager.
| |
AddStdSignatureHandler(Byte, String) |
Adds a standard (built-in) signature handler to the signature manager. This method will use cryptographic
algorithm based on Adobe.PPKLite/adbe.pkcs7.detached filter to sign a PDF.
| |
AddStdSignatureHandler(String, String) |
Adds a standard (built-in) signature handler to the signature manager. This method will use cryptographic
algorithm based on Adobe.PPKLite/adbe.pkcs7.detached filter to sign a PDF.
| |
AppendTextDiff(Page, Page) | Imports two external pages and highlights the differences between them.
This function adds two new pages to the current document. The two input
pages are typically coming from two different PDF files.
Note: Each contiguous block of change is considered a single difference.
A deletion immediately followed by an insertion is considered a single edit.
| |
AppendTextDiff(PDFDoc, PDFDoc) | Imports two external PDFs and highlights the differences between them.
This function appends alternating pages from the two input documents into the current document.
Note: Each contiguous block of change is considered a single difference.
A deletion immediately followed by an insertion is considered a single edit.
| |
AppendTextDiff(PDFDoc, PDFDoc, TextDiffOptions) | Imports two external PDFs and highlights the differences between them.
This function appends alternating pages from the two input documents into the current document.
Note: Each contiguous block of change is considered a single difference.
A deletion immediately followed by an insertion is considered a single edit.
| |
AppendVisualDiff | 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.
| |
Close | ||
CreateDigitalSignatureField | Creates an unsigned digital signature form field inside the document with an automatically-generated unique name.
| |
CreateDigitalSignatureField(String) | Creates an unsigned digital signature form field inside the document.
| |
CreateIndirectArray | Creates the indirect Array.
| |
CreateIndirectBool | Creates the indirect bool.
| |
CreateIndirectDict | Creates the indirect dict.
| |
CreateIndirectName | The following list of methods is used to create SDF/Cos indirect objects.
Unlike direct objects, indirect objects can be referenced by more than one
object (i.e. indirect objects they can be shared).
| |
CreateIndirectNull | Creates the indirect null.
| |
CreateIndirectNumber | Creates the indirect number.
| |
CreateIndirectStream(Byte) | Creates the indirect stream.
| |
CreateIndirectStream(FilterReader) | Creates the indirect stream.
| |
CreateIndirectStream(Byte, IFilter) | Creates the indirect stream.
| |
CreateIndirectStream(FilterReader, IFilter) | Creates the indirect stream.
| |
CreateIndirectString(Byte) | Creates the indirect string.
| |
CreateIndirectString(String) | Creates the indirect string.
| |
Destroy | Closes PDFDoc and release resources
| |
Equals | (Inherited from Object.) | |
FDFExtract | Fdf extract.
| |
FDFExtract(IVectorIAnnot) | ||
FDFExtract(PDFDocExtractFlag) | Extract selected annotations to FDF.
| |
FDFMerge | Import form data from FDF file to PDF interactive form.
| |
FDFUpdate | Replace existing form and annotation data with those imported from the FDF file. It will
make annotations in the FDF match those in the PDF.
Since this method avoids updating annotations unnecessarily it works well with incremental save
and can sometimes preserve annotation appearances, but it requires that the annotations
intended to be in the final document be in the provided FDF file.
Note: Some PDF viewers (like Chrome) cannot display annotations that don't already have
an appearance, so it is often desirable to call PDFDoc.RefreshAnnotAppearances after
this method to ensure these annotations can still be displayed in those applications.
Note: This method is not suitable for realtime collaboration.
| |
FieldCreate(String, FieldType) | Create a new interactive form Field.
| |
FieldCreate(String, FieldType, Obj) | Field create.
| |
FieldCreate(String, FieldType, String) | Field create.
| |
FieldCreate(String, FieldType, Obj, Obj) | Field create.
| |
FieldCreate(String, FieldType, String, String) | Field create.
| |
FlattenAnnotations | Flatten all annotations in the document. | |
FlattenAnnotations(Boolean) | Flatten all annotations in the document. | |
GenerateThumbnails |
Generates thumbnail images for all the pages in this PDF document.
| |
GetAcroForm | Gets the acro form.
| |
GetDigitalSignatureFieldIterator | Retrieves an iterator that iterates over digital signature fields. | |
GetDigitalSignaturePermissions | Retrieves the most restrictive document permissions locking level from all of the signed digital signatures in the document. | |
GetDocInfo | Gets the doc info.
| |
GetField | field_name - a string representing the fully qualified name of
the field (e.g. "employee.name.first").
| |
GetFieldIterator | An interactive form (sometimes referred to as an AcroForm) is a
collection of fields for gathering information interactively from
the user. A PDF document may contain any number of fields appearing
on any combination of pages, all of which make up a single, global
interactive form spanning the entire document.
The following methods are used to access and manipulate Interactive form
fields (sometimes referred to as AcroForms).
| |
GetFileName | Gets the file name.
| |
GetFirstBookmark | ||
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetOCGConfig | Gets the OCG configuration.
| |
GetOCGs | Gets the oC gs.
| |
GetOpenAction | ||
GetPage | Gets the page.
| |
GetPageCount | Gets the page count.
| |
GetPageIterator | Gets the page iterator.
| |
GetPageIterator(Int32) | Gets the page iterator.
| |
GetPageLabel | Gets the page label.
| |
GetPages | Gets the pages.
| |
GetRoot | Gets the root.
| |
GetSDFDoc | Gets the SDFDoc.
| |
GetSecurityHandler | Gets the security handler.
| |
GetSignatureHandler |
Gets the associated signature handler instance from the signature manager by looking it up with the
provided id.
| |
GetTrailer | Gets the trailer.
| |
GetTriggerAction | Get the Action associated with the selected PDFDoc Trigger event
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GetUndoManager | ||
GetViewPrefs | Gets the view prefs.
| |
HasOC | Gets the structure tree.
| |
HasRepairedXRef | Checks whether or not the underlying file has an XRef table that had to be repaired
when the file was opened.If the document had an invalid XRef table when opened,
PDFNet will have repaired the XRef table for its working representation of the document.
| |
HasSignatures | Indicates whether this documents contains any digital signatures.
| |
HighlightTextDiff | Highlights the differences between the external PDFs. The highlights are added directly to the inputs.
This function directly adds the highlights to the two input documents.
Note: Each contiguous block of change is considered a single difference.
A deletion immediately followed by an insertion is considered a single edit.
| |
ImportPages(IVectorPage) | ||
ImportPages(IVectorPage, Boolean) | ||
InitSecurityHandler | Initializes document's SecurityHandler. This version of InitSecurityHandler()
works with Standard and Custom PDF security and can be used in situations where
the password is obtained dynamically via user feedback. See EncTest sample for
example code.
This function should be called immediately after an encrypted
document is opened. The function does not have any side effects on
documents that are not encrypted.
If the security handler was successfully initialized it can be later obtained
using GetSecurityHandler() method.
| |
InitSecurityHandler(Int32) | Inits the security handler.
| |
InitStdSecurityHandler(Byte) |
Initializes document's SecurityHandler using the supplied
password. This version of InitSecurityHandler() assumes that
document uses Standard security and that a password is specified
directly.
This function should be called immediately after an encrypted
document is opened. The function does not have any side effects on
documents that are not encrypted.
If the security handler was successfully initialized, it can be later
obtained using GetSecurityHandler() method.
| |
InitStdSecurityHandler(String) | Initializes document's SecurityHandler using the supplied
password. This version of InitSecurityHandler() assumes that
document uses Standard security and that a password is specified
directly.
This function should be called immediately after an encrypted
document is opened. The function does not have any side effects on
documents that are not encrypted.
If the security handler was successfully initialized, it can be later
obtained using GetSecurityHandler() method.
| |
InsertPages(Int32, PDFDoc, PageSet, PDFDocInsertFlag) | Inserts a range of pages from specified PDFDoc using PageSet
| |
InsertPages(Int32, PDFDoc, Int32, Int32, PDFDocInsertFlag) | ||
IsEncrypted | Checks if is encrypted.
| |
IsLinearized | Call this function to determine whether the document is represented in
linearized (fast web view) format.
| |
IsLocked | Checks if is locked.
| |
IsModified | Call this function to determine whether the document has been modified since
it was last saved.
| |
IsTagged | Checks if is tagged.
| |
Lock |
Locks the document to prevent competing threads from accessiong the document
at the same time. Threads attempting to access the document will wait in
suspended state until the thread that owns the lock calls doc.Unlock().
| |
LockRead |
Locks the document to prevent competing write threads (using Lock()) from accessing the document
at the same time. Other reader threads however, will be allowed to access the document.
Threads attempting to obtain write access to the document will wait in
suspended state until the thread that owns the lock calls doc.UnlockRead().
| |
MergeXFDF(String, MergeXFDFOptions) |
Merge existing form and annotation data with those imported from the XFDF file. It will
replace annotations from pdfdocument with matching annotations from XFDF.
In order for the annotations to be considered matching, "name" of the xfdf annotation needs to match "NM"
of that in pdf.
XFDF annotations that don't have a match in the pdf document will be added.
For regular xfdf files, no deletions will be made
This method also supports command form of xfdf, for those files, deletions will be performed for
annotations in "delete" section
Since this method avoids updating annotations unnecessarily it works well with incremental save.
Note: This method is suitable for realtime collaboration.
| |
MergeXFDF(IFilter, MergeXFDFOptions) |
Merge existing form and annotation data with those imported from the XFDF file. It will
replace annotations from pdfdocument with matching annotations from XFDF.
In order for the annotations to be considered matching, "name" of the xfdf annotation needs to match "NM"
of that in pdf.
XFDF annotations that don't have a match in the pdf document will be added.
For regular xfdf files, no deletions will be made
This method also supports command form of xfdf, for those files, deletions will be performed for
annotations in "delete" section
Since this method avoids updating annotations unnecessarily it works well with incremental save.
Note: This method is suitable for realtime collaboration.
| |
MovePages(Int32, PDFDoc, PageSet, PDFDocInsertFlag) | Moves a range of pages from specified PDFDoc. Pages are deleted from source document after move.
| |
MovePages(Int32, PDFDoc, Int32, Int32, PDFDocInsertFlag) | Moves a range of pages from specified PDFDoc. Pages are deleted from source document after move.
| |
PageCreate | Create a new, empty page in the document. You can use PageWriter to fill the
page with new content. Finally the page should be inserted at specific
place within document page sequence using PageInsert/PagePushFront/PagePushBack
methods.
| |
PageCreate(Rect) | Page create.
| |
PageInsert | Insert/Import a single page at a specific location in the page sequence.
| |
PagePushBack | Adds a page to the end of a documents's page sequence.
| |
PagePushFront | Adds a page to the beginning of a documents's page sequence.
| |
PageRemove | Page remove.
| |
RefreshAnnotAppearances | Generates the appearance stream for annotations in the document using the default RefreshOptions. A common use case is to generate appearances
only for missing annotations, which can be accomplished using the default options.
| |
RefreshAnnotAppearances(RefreshOptions) | Generates the appearance stream for annotations in the document using the specified options. A common use case is to generate appearances
only for missing annotations, which can be accomplished using the default options.
| |
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.
| |
RemovePageLabel | Removes the page label that is attached to the specified page,
effectively merging the specified range with the previous page
label sequence.
| |
RemoveSecurity | Removes all security for the document. | |
RemoveSignatureHandler |
Removes a signature handler from the signature manager.
| |
SaveAsync |
Saves all changes incrementally to the document and writes them to the original source.
Incremental saving is very fast, as it only appends data to the end of the file (and so is independent of the file size)
This is suitable for quick save operations that you don't want to interrupt the user of the app.
| |
SaveAsync(SDFDocSaveOptions) |
Saves all changes incrementally document and writes them to the original source.
Note that this might be slow, unless you are using the e_incremental flag only.
Preferably shouldn't be used while the user is viewing the document.
Saving with the e_incremental flag only will only append data, making the save fast
no matter the original file size.
| |
SaveAsync(String, SDFDocSaveOptions) |
Saves all changes to the document and writes them to a file pointed by the given path.
| |
SaveAsync(IStorageFile, SDFDocSaveOptions) |
Saves all changes to the document and writes them to an IRandomAccessStream instance without
using the saved document as the new source.
Note, this will assume that randomAccessStream is pointing to a different location that the PDFDoc currently is.
If this is not the case, the behavior is undefined and may corrupt the underlying document.
| |
SaveAsync(IOutputStream, SDFDocSaveOptions) |
Saves all changes to the document and writes them to an IOutputStream instance.
| |
SaveAsync(IRandomAccessStream, SDFDocSaveOptions) |
Saves all changes to the document and writes them to an IRandomAccessStream instance.
Note, this save method will always create a copy of the document first, as it can no establish
whether randomAccessStream is referring to the same location as the document, and so will make a
copy for safety. If you know the location is different, then use SaveToNewLocationAsync.
| |
SaveAsync(IFilter, SDFDocSaveOptions) |
Saves all changes to the document and writes them to file specified by the IStorageFile instance
without using the saved document as the new source.
Note, this will assume that randomAccessStream is pointing to a different location that the PDFDoc currently is.
If this is not the case, the behavior is undefined and may corrupt the underlying document.
| |
SaveAsync(IRandomAccessStream, SDFDocSaveOptions, String) |
Saves all changes to the document and writes them to an IRandomAccessStream instance.
Note, this save method will always create a copy of the document first, as it can no establish
whether randomAccessStream is referring to the same location as the document, and so will make a
copy for safety. If you know the location is different, then use SaveToNewLocationAsync.
| |
SaveCustomSignature(Byte, DigitalSignatureField, IFilter) | Saves a custom signature Contents to a document which has been prepared to receive it. No changes should be made to document in meantime. | |
SaveCustomSignature(Byte, DigitalSignatureField, String) |
Saves all changes to the document and writes them to an output IFilter sink without using the
saved document as the new source.
| |
SaveToBufferAsync |
Saves all changes to the document and writes them to a buffer.
| |
SaveToNewLocationAsync(IStorageFile, SDFDocSaveOptions) |
Saves all changes to the document and writes them to an IRandomAccessStream instance.
Note, this will assume that storageFile is pointing to a different location that the PDFDoc currently is.
If this is not the case, the behavior is undefined and may corrupt the underlying document.
| |
SaveToNewLocationAsync(IRandomAccessStream, SDFDocSaveOptions, String) |
Saves all changes to the document and writes them to an IRandomAccessStream instance.
Note, this will assume that randomAccessStream is pointing to a different location that the PDFDoc currently is.
If this is not the case, the behavior is undefined and may corrupt the underlying document.
| |
SetOpenAction | ||
SetPageLabel | Attaches a label to a page. This establishes the numbering scheme
for that page and all following it, until another page label is
encountered. This label allows PDF producers to define a page
numbering system other than the default.
| |
SetSecurityHandler | The function sets a new SecurityHandler as the current security handler.
| |
TimedLock | Try locking the document, waiting no longer than specified number of milliseconds.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
TryLock | Try locking the document in non-blocking manner.
| |
Unlock |
Removes the lock from the document.
| |
UnlockRead |
Removes the read lock from the document.
| |
VerifySignedDigitalSignatures |
Attempts to verify all signed cryptographic digital signatures in the document, ignoring unsigned signatures.
|