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

NameTypeAccessDescription
textReplaceOptionsTextReplaceOptionsReadReturns the text replace options used by this editor.
replaceTextStrategyReplaceTextStrategyReadReturns text-replacement strategy settings.
documentDocumentReadReturns the bound document.

méthodes

SignatureDescription
PdfContentEditor()Creates a new {@code PdfContentEditor} instance.
getTextReplaceOptions()TextReplaceOptionsReturns the text replace options used by this editor.
setTextReplaceOptions(options: TextReplaceOptions)Sets the text replace options.
getReplaceTextStrategy()ReplaceTextStrategyReturns text-replacement strategy settings.
bindPdf(inputFile: String)booleanBinds a PDF file to this editor.
bindPdf(inputStream: InputStream)booleanBinds a PDF from an input stream.
bindPdf(document: Document)booleanBinds an existing {@link Document} to this editor.
save(outputFile: String)booleanSaves the bound document to a file.
save(outputStream: OutputStream)booleanSaves the bound document to an output stream.
replaceText(searchText: String, replaceText: String)booleanReplaces all occurrences of the specified text throughout the entire document.
replaceText(searchText: String, pageNumber: int, replaceText: String)booleanReplaces all occurrences of the specified text on a specific page.
getDocument()DocumentReturns the bound document.
getStamps(pageNumber: int)StampInfo[]Returns stamp metadata stored on a page.
deleteStampById(pageNumber: int, stampId: int)booleanDeletes a stamp metadata entry by stamp id.
deleteStampById(stampId: int)booleanDeletes 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)booleanCreates 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
 Français