PdfAnnotationEditor
Vue de l’ensemble
‘PdfAnnotationEditor’ est une classe dans Aspose.PDF FOSS pour Java.
Il fournit des méthodes pour gérer les notes dans un document PDF: flattre, supprimer et compter les annotations.
Cette classe fournit 21 méthodes pour travailler avec des objets de PdfAnnotationEditor dans les programmes Java. Les méthodologies disponibles comprennent: PdfAnotationsEditeur, bindPDF , ‘close;deleteAnnotions; exportAnnotesXfdf: flattenAnnotations',getAnnote Count: getDocument. importAnnuationsFromXFdf‘ : importAnnationsFomXffdf’ : modifierAnnontiesAuthor . Tous les membres publics sont accessibles à toute application Java après l’installation de l’Aspose.PDF FOSS pour le package Java : Propriétés : `document ́.
Propriétés
| Name | Type | Access | Description |
|---|---|---|---|
document | Document | Read | Returns the bound document. |
méthodes
| Signature | Description |
|---|---|
PdfAnnotationEditor() | Creates a new {@code PdfAnnotationEditor} instance. |
PdfAnnotationEditor(document: Document) | Creates a new {@code PdfAnnotationEditor} bound to the specified document. |
bindPdf(inputFile: String) → boolean | Binds a PDF file to this editor. |
bindPdf(inputStream: InputStream) → boolean | Binds a PDF from an input stream. |
bindPdf(document: Document) → boolean | Binds an existing {@link Document} to this editor. |
flattenAnnotations() → boolean | Flattens all annotations in the document: each annotation that carries a |
| normal appearance stream ({@code /AP /N}) has that appearance burned into | |
| the page content stream — wrapped in a {@code q | |
deleteAnnotations() → boolean | Deletes all annotations from all pages in the document. |
deleteAnnotations(annotationType: String) → boolean | Deletes annotations of the specified type from all pages. |
getAnnotationCount(pageNumber: int) → int | Returns the number of annotations on the specified page. |
modifyAnnotationsAuthor(startPage: int, endPage: int, oldAuthor: String, newAuthor: String) | Renames the author (the annotation’s /T entry) on every markup |
| annotation in the inclusive page range [startPage, endPage] whose | |
| current author equals {@code oldAuthor}. | |
save(outputFile: String) → boolean | Saves the bound document to a file. |
save(outputStream: OutputStream) → boolean | Saves the bound document to an output stream. |
exportAnnotationsXfdf(stream: OutputStream, startPage: int, endPage: int, annotTypes: AnnotationType[]) | Exports annotations to XFDF format, optionally filtering by page range and type. |
importAnnotationFromXfdf(stream: InputStream, annotTypes: AnnotationType[]) | Imports annotations from an XFDF input stream. |
importAnnotationFromXfdf(stream: InputStream) | Imports annotations from an XFDF input stream (all types). |
importAnnotationFromXfdf(filePath: String) | Imports annotations from an XFDF file (all types). |
importAnnotationsFromXfdf(filePath: String) | Imports annotations from an XFDF file (all types). |
importAnnotationsFromXfdf(stream: InputStream) | Imports annotations from an XFDF input stream (all types). |
importAnnotationsFromXfdf(stream: InputStream, annotTypes: AnnotationType[]) | Imports annotations from an XFDF input stream with type filtering. |
getDocument() → Document | Returns the bound document. |
close() | Closes the editor and releases the bound document. |
Voir aussi
- Aspose.PDF pour Java — API d’entreprise