Click or drag to resize

CPDFDocument Class

Document instance. One CPDFDocument object for one document. This class is used to represent a specified directory, which contains PDF files and user wants to search among these PDF files.
Inheritance Hierarchy
SystemObject
  ComPDFKit.PDFDocumentCPDFDocument

Namespace:  ComPDFKit.PDFDocument
Assembly:  ComPDFKit.NET (in ComPDFKit.NET.dll) Version: 2.0.0.0
Syntax
C#
public class CPDFDocument

The CPDFDocument type exposes the following members.

Properties
  NameDescription
Public propertyErrorType
Error message for the document loading. To determine the error type, use the code to obtain error of type CPDFDocumentError. Except for the CPDFDocumentPasswordError error, other errors cannot open the document. If CPDFDocumentPasswordError, reading the document requires a password.
Public propertyFileName
Gets document name.
Public propertyFilePath
The path for the document
Public propertyHasRepaired
Whether document is repaired.
Public propertyIsEncrypted
Whether document is encrypted.
Public propertyIsLocked
Whether the document is locked.
Public propertyPageCount
The total count of document pages.
Top
Methods
  NameDescription
Public methodAddBookmark
Adds bookmark
Public methodApplyRedaction
Applies redaction annotations in current documentation.
Public methodBookmarkForPageIndex
Returns the bookmark at the specified index. Indexes are zero based. This method will return null if index is out of bounds.
Public methodCheckOwnerPassword
Public methodStatic memberCreateDocument
Initializes a CPDFDocument object with new PDF.
Public methodDecrypt
Decrypts document.
Public methodDeleteWatermarks
Removes all watermarks in the document.
Public methodEditBookmark
Edits bookmark title at the specified page index.
Public methodEncrypt
Encrypts document.
Public methodExchangePage
Exchanges one page with another. This method will return false if either index value is out of bounds.
Public methodExportAnnotationToXFDFPath
Exports annotations to XFDF document.
Public methodExtractImage
Exports all the images on the page.
Public methodGetBackground
Gets the document’s background.
Public methodGetBates
Gets the document’s bates.
Public methodGetBookmarkList
Gets bookmark list of document.
Public methodGetEncryptAlgorithm
Gets the algorithm of document encryption.
Public methodGetHeaderFooter
Gets the document’s header & footer.
Public methodGetInfo
Gets document information.
Public methodGetOutlineList
Gets outline list of document.
Public methodGetOutlineRoot
Gets outline root of document.
Public methodGetPageSize
Gets page size
Public methodGetPDFType
Gets PDF/A conformance levels.
Public methodGetPermissionsInfo
Gets permission information of document.
Public methodGetSignatureList
Get signature list
Public methodImportAnnotationFromXFDFPath
Imports annotations from XFDF document.
Public methodImportPages
Imports page(s) from another document at the end of the document.
Public methodImportPagesAtIndex
Imports page(s) from another document at the specified index point.
Public methodInitWatermark
Creates watermark.
Public methodStatic memberInitWithBytes
Public methodStatic memberInitWithFilePath
Initializes a CPDFDocument object with the contents at the specified URL.
Public methodStatic memberInitWithStream
Public methodStatic memberInitWithUrl
Public methodInsertPage(Int32, Single, Single, Byte)
Public methodInsertPage(Int32, Single, Single, String)
Inserts a blank page with image at the specified index point. Indexes are zero based. The index must lie within bounds, or be equal to the length of bounds.
Public methodIsValid
Whether the object is valid.
Public methodMovePage
Moves one page to another. This method will return false if either index value is out of bounds.
Public methodPageAtIndex
Returns a CPDFPage object representing the page at index. Indexes are zero based. This method will return null if index is out of bounds.
Public methodPdfToImage
Converts the specified page(s) to image.
Public methodPdfToText
Converts the specified page(s) to text.
Public methodRelease
Releases resource of the object.
Public methodReleaseOutlineList
Releases resources of the object.
Public methodReleasePages
Releases resources of the specified page or release resources of all page objects if pageIndex is -1
Public methodRemoveBookmark
Removes the bookmark at the specified index.
Public methodRemovePages
Remove page(s).
Public methodRemoveSignature
Removes a signature from the PDF document.
Public methodRotatePage
Rotates page at the specified index number.
Public methodSetInfo
Sets document information.
Public methodUnlockWithPassword
Attempts to unlock an encrypted document. If the password is correct, this method returns true, else returns false. Once unlocked, you cannot use this function to relock the document.
Public methodWriteFlattenToFilePath
Writes the document to the specified URL after flattening.
Public methodWritePDFAToFilePath
Converts existing PDF files to PDF/A compliant documents, including PDF/A-1a and PDF/A-1b only. The conversion option analyzes the content of existing PDF files and performs a sequence of modifications in order to produce a PDF/A compliant document. Features that are not suitable for long-term archiving(such as encryption, obsolete compression schemes, missing fonts, or device-dependent color) are replaced with their PDF/A compliant equivalents.Because the conversion process applies only necessary changes to the source file, the information loss is minimal.
Public methodWriteSignatureToFilePath
Writes the signature represented by the specified signature widget to a file.
Public methodWriteToBytes
Public methodWriteToFilePath
Writes the document to a location specified by the passed-in URL.
Public methodWriteToLoadedPath
Writes the document to the original path.
Public methodWriteToStream
Top
See Also