Pdf Document Editor
interface PdfDocumentEditor
Editor for PDF documents. A document editor can perform operations on a PDF document for page manipulation, reordering and importing documents. Document editor won't directly manipulate the returned document instance but will keep track of all editing steps internally, allowing them to save them back once editing is complete. To create a document editor use createForDocument.
Functions
Link copied to clipboard
Link copied to clipboard
Begins a batch of document editor operations, undoable/redoable as a single unit.
Link copied to clipboard
Ends a batch of document editor operations and commits them immediately.
Link copied to clipboard
Discards the current batch of document operations.
Link copied to clipboard
Duplicates pages of the document.
Link copied to clipboard
abstract fun exportPages(@NonNull context: Context, @NonNull outputStream: OutputStream, @NonNull pageIndexes: Set<Integer>, @Nullable options: DocumentSaveOptions): Completable
Exports selected pages to an output stream.
Link copied to clipboard
Returns the original document being edited.
Link copied to clipboard
Returns the page count of the edited document.
Link copied to clipboard
Returns page size of a given page already rotated.
Link copied to clipboard
abstract fun importDocument(@NonNull context: Context, @NonNull documentSource: DocumentSource, @IntRange(from = 0 ) destinationIndex: Int): Single<List<EditingChange>>
Imports all the pages from a given document source to a destination index.
Link copied to clipboard
Checks if there's currently an active document editor transaction.
Link copied to clipboard
Perform redo changes on document editor.
Link copied to clipboard
Removes pages from the document.
Link copied to clipboard
abstract fun renderPageToBitmap(@IntRange(from = 0 ) pageIndex: Int, @NonNull buffer: Bitmap, @NonNull configuration: PageRenderConfiguration): Completable
Renders the given page into a Bitmap buffer.
Link copied to clipboard
abstract fun rotatePages(@NonNull pageIndexes: Set<Integer>, rotation: Int): Single<List<EditingChange>>
Rotate pages of the document.
Link copied to clipboard
abstract fun saveDocument(@NonNull context: Context, @Nullable options: DocumentSaveOptions): Completable
Saves all changes made to the document.
abstract fun saveDocument(@NonNull context: Context, @NonNull outputStream: OutputStream, @Nullable options: DocumentSaveOptions): Completable
Saves all changes made to the document to a given output stream.
Link copied to clipboard
Sets a new page label for the edited document.
Link copied to clipboard
Perform undo changes on document editor.