PdfContentEditor
Vue de l’ensemble
‘PdfContentEditor’ est une classe dans Aspose.PDF FOSS pour Java.Déduit de: AutoCloseable.
Il fournit des méthodes pour l’édition de contenu PDF, principalement les opérations de remplacement du texte.
Cette classe fournit 17 méthodes pour travailler avec des objets PdfContentEditor dans les programmes Java. Les méthodologies disponibles comprennent: PdfcontentEdit, bindPDF , ‘close ; 'createText; deleteStampById : getDocument: 'getReplaceTeXTStrategy et ‘gettStams . , ‘getTeXTexteReplacementOptions. , replaceTeTex‘, 'save., ‘setTexeReplacementsOption.. 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', 'replacementTexteStrategie
Propriétés
| Name | Type | Access | Description |
|---|---|---|---|
textReplaceOptions | TextReplaceOptions | Read | Returns the text replace options used by this editor. |
replaceTextStrategy | ReplaceTextStrategy | Read | Returns text-replacement strategy settings. |
document | Document | Read | Returns the bound document. |
méthodes
| Signature | Description |
|---|---|
PdfContentEditor() | Creates a new {@code PdfContentEditor} instance. |
getTextReplaceOptions() → TextReplaceOptions | Returns the text replace options used by this editor. |
setTextReplaceOptions(options: TextReplaceOptions) | Sets the text replace options. |
getReplaceTextStrategy() → ReplaceTextStrategy | Returns text-replacement strategy settings. |
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. |
save(outputFile: String) → boolean | Saves the bound document to a file. |
save(outputStream: OutputStream) → boolean | Saves the bound document to an output stream. |
replaceText(searchText: String, replaceText: String) → boolean | Replaces all occurrences of the specified text throughout the entire document. |
replaceText(searchText: String, pageNumber: int, replaceText: String) → boolean | Replaces all occurrences of the specified text on a specific page. |
getDocument() → Document | Returns the bound document. |
getStamps(pageNumber: int) → StampInfo[] | Returns stamp metadata stored on a page. |
deleteStampById(pageNumber: int, stampId: int) → boolean | Deletes a stamp metadata entry by stamp id. |
deleteStampById(stampId: int) → boolean | Deletes stamp metadata entries by stamp id from all pages. |
createText(rect: org.aspose.pdf.Rectangle, title: String, contents: String, open: boolean, icon: String, pageNumber: int) → boolean | Creates a {@link org.aspose.pdf.annotations.TextAnnotation} on |
| the given page at the given rectangle. | |
close() | Closes the editor and releases the bound document. |
Voir aussi
- Aspose.PDF pour Java — API d’entreprise