Pdf Document
interface PdfDocument
A PDF document. To create an instance use openDocument or related static methods on the PdfDocumentLoader class.
Inheritors
Properties
Link copied to clipboard
Rotation value returned for pages that aren't rotated.
Link copied to clipboard
Rotation value returned for pages that are rotated 180°.
Link copied to clipboard
Rotation value returned for pages that are rotated 270°.
Link copied to clipboard
Rotation value returned for pages that are rotated 90°.
Functions
Link copied to clipboard
abstract fun addLongTermValidation(@NonNull signatureFormElement: SignatureFormElement, @NonNull certificates: List<X509Certificate>): Completable
This adds long term validation to an existing signature form element that has already been signed or refreshes that information if the signature is already LTV enabled.
Link copied to clipboard
Creates a TextBlock from the given page.
Link copied to clipboard
Returns AnnotationProvider object which handles annotations contained in this document.
Link copied to clipboard
Returns BookmarkProvider object which handles bookmarks contained in this document.
Link copied to clipboard
Link copied to clipboard
Returns PdfDocumentCheckpointer object which handles the checkpoint for the document.
Link copied to clipboard
Returns a default set of document save options which have same permissions, password and PDF version set as this document.
Link copied to clipboard
Returns a document identifier.
Link copied to clipboard
Returns a string representation of a document identifier.
Link copied to clipboard
Returns information about digital signatures in this document.
Link copied to clipboard
Returns information about digital signatures in this document.
Link copied to clipboard
Returns source of this document.
Link copied to clipboard
Returns list of DocumentSources from which this document is loaded.
Link copied to clipboard
Returns EmbeddedFilesProvider object which handles embedded files contained in this document.
Link copied to clipboard
Returns FormProvider object which handles forms contained in this document.
Link copied to clipboard
abstract fun getHashForDocumentRange(@NonNull range: List<Long>, @NonNull hashAlgorithm: HashAlgorithm): Array<Byte>
abstract fun getHashForDocumentRange(sourceIndex: Int, @NonNull range: List<Long>, @NonNull hashAlgorithm: HashAlgorithm): Array<Byte>
Returns the hash of a particular byte range of the document.
Link copied to clipboard
Returns JavaScriptProvider object which handles JavaScript execution for this document.
Link copied to clipboard
Returns list of top-level (outline / table-of-contents) bookmarks.
Link copied to clipboard
Returns list of top-level (outline / table-of-contents) bookmarks, asynchronously.
Link copied to clipboard
Returns the current document's PageBinding.
Link copied to clipboard
Link copied to clipboard
Returns number of pages in this document.
Link copied to clipboard
Link copied to clipboard
abstract fun getPageLabel(@IntRange(from = 0 ) pageIndex: Int, substituteWithPlainLabel: Boolean): String
Gets the page label.
Link copied to clipboard
Returns a page rotation in degrees.
Link copied to clipboard
Returns a page size in PDF points.
Link copied to clipboard
Gets number of characters in text on the page.
Link copied to clipboard
Link copied to clipboard
Returns metadata (title, author, creation date, ...) of this document, stored in the PDF document dictionary.
Link copied to clipboard
Returns auxiliary projection class for mapping coordinate space between raw and normalized Pdf.
Link copied to clipboard
Returns current PDF version of the document.
Link copied to clipboard
Returns set of currently applied permission flags on this document.
Link copied to clipboard
Returns the rotation offset applied to this page in degrees.
Link copied to clipboard
Gets the secondary unit value from the document
Link copied to clipboard
Returns page text for a list of text blocks.
Link copied to clipboard
Returns document metadata stored in the XMP metadata entries included in the PDF file.
Link copied to clipboard
Checks whether this document has embedded files, which includes all the file annotations
Link copied to clipboard
Checks whether this document has outline / table of contents
Link copied to clipboard
Test document permission flags.
Link copied to clipboard
Pre-fetches rotations, sizes and labels for all pages on a background thread.
Link copied to clipboard
Pre-fetches rotations, sizes and labels for all pages on a background thread.
Link copied to clipboard
Invalidates the rendered cache of all the pages for this
document
.Link copied to clipboard
Invalidates the rendered cache of the given
pageIndex
for this document
.Link copied to clipboard
Whether or not automatic link generation is enabled.
Link copied to clipboard
Whether or not watermark filtering is enabled.
Link copied to clipboard
Query whether the document data source is read/write (is not compounded and comes from a supported source) and whether saving is enabled.
Link copied to clipboard
Link copied to clipboard
abstract fun renderPageToBitmapAsync(@NonNull context: Context, pageIndex: Int, width: Int, height: Int): Single<Bitmap>
abstract fun renderPageToBitmapAsync(@NonNull context: Context, @IntRange(from = 0 ) pageIndex: Int, width: Int, height: Int, @NonNull configuration: PageRenderConfiguration): Single<Bitmap>
Renders page to a bitmap.
Link copied to clipboard
Saves the document to original location if it has been changed.
abstract fun saveIfModified(@NonNull path: String, @NonNull saveOptions: DocumentSaveOptions): Boolean
Saves the document to passed location if it has been changed.
Link copied to clipboard
Saves the document back to original location if it has been changed.
abstract fun saveIfModifiedAsync(@NonNull path: String, @NonNull saveOptions: DocumentSaveOptions): Single<Boolean>
Saves the document to an external file if it has been changed.
Link copied to clipboard
Enables or disables automatic link generation.
Link copied to clipboard
Sets the PageBinding controlling in which direction pages of documents are laid out.
Link copied to clipboard
Applies a temporary rotation to the specified page of this document.
Link copied to clipboard
Applies a temporary rotation to the specified pages of this document.
Link copied to clipboard
abstract fun setSecondaryMeasurementUnit(@NonNull secondaryMeasurementUnit: SecondaryMeasurementUnit)
Sets the secondary unit value on the document.
Link copied to clipboard
Enables or disables filtering of watermark text in text retrieval methods.
Link copied to clipboard
Returns
true
if this document was modified and should be saved to retain changes.