EditablePdfDocument
interface EditablePdfDocument : PdfDocument
Represents a PDF document that allows for editing.
Summary
Public functions |
|
|---|---|
suspend Unit |
applyEdit(record: FormEditInfo)Applies the changes specified by |
suspend List<String> |
@ExperimentalPdfApiApplies a list of edits to the document sequentially in the order they are provided in the |
PdfWriteHandle |
Creates a |
Inherited functions |
||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Inherited properties |
||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
Public functions
applyEdit
suspend fun applyEdit(record: FormEditInfo): Unit
Applies the changes specified by record to the form.
Any areas which are invalidated due to this operation are notified via OnPdfContentInvalidatedListener callback.
It is recommended to maintain a list of androidx.pdf.models.FormEditInfo applied to the document so they can be saved and restored across destructive events like low memory kills or configuration changes.
| Parameters | |
|---|---|
record: FormEditInfo |
The |
| Throws | |
|---|---|
IllegalArgumentException |
if the provided |
applyEdits
@ExperimentalPdfApi
suspend fun applyEdits(editsDraft: EditsDraft): List<String>
Applies a list of edits to the document sequentially in the order they are provided in the editsDraft.
| Parameters | |
|---|---|
editsDraft: EditsDraft |
: edits to be applied on pdf document. |
| Returns | |
|---|---|
List<String> |
List of unique edit IDs (such as annotation IDs) corresponding to each operation in the order they were enqueued. |
| Throws | |
|---|---|
PdfEditApplyException |
if any of the edit failed to be applied. |
createWriteHandle
fun createWriteHandle(): PdfWriteHandle
Creates a PdfWriteHandle which can be used to save the document to a ParcelFileDescriptor.