PdfFileStamp
Vue de l’ensemble
‘PdfFileStamp’ est une classe dans Aspose.PDF FOSS pour Java.Déduit de: AutoCloseable.
Fournit des méthodes pour ajouter des étiquettes (texte ou image) à des pages PDF.
Cette classe fournit 23 méthodes pour travailler avec des objets PdfFileStamp dans les programmes Java. Les méthodologies disponibles comprennent: Pdffile Stamp, addFooter , adHeader ; addPageNumber; ddStemp : ‘bindPDF: clos et getDocument. gettStumpCount . GetStapId., save,, setInputFilainsi que 1 méthode supplémentaire. 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‘, ‘stampCound`…
Propriétés
| Name | Type | Access | Description |
|---|---|---|---|
document | Document | Read | Returns the bound document, or {@code null}. |
stampId | int | Read | Returns the stamp id used by convenience stamp helpers. |
stampCount | int | Read | Returns the number of stamps that have been added. |
méthodes
| Signature | Description |
|---|---|
PdfFileStamp() | Creates a new {@code PdfFileStamp} instance. |
PdfFileStamp(inputStream: InputStream, outputStream: OutputStream) | Creates a {@code PdfFileStamp} bound to the input stream and configured to |
| write the stamped result to the supplied output stream when | |
| {@link #close()} is called. | |
PdfFileStamp(inputFile: String, outputFile: String) | Creates a {@code PdfFileStamp} bound to {@code inputFile} and configured |
| to write the stamped result to {@code outputFile} when {@link #close()} | |
| is called. | |
PdfFileStamp(document: Document) | Creates a {@code PdfFileStamp} bound to {@code document}. |
getDocument() → Document | Returns the bound document, or {@code null}. |
setInputFile(inputFile: String) | Sets the input file path. |
bindPdf(inputFile: String) → boolean | Binds a PDF file to this stamp editor. |
bindPdf(inputStream: InputStream) → boolean | Binds a PDF from an input stream. |
bindPdf(document: Document) → boolean | Binds an existing {@link Document} to this stamp editor. |
addStamp(stamp: TextStamp) | Adds a text stamp to the list of stamps to apply. |
addStamp(stamp: Stamp) | Adds a facades {@link Stamp} to the list of stamps to apply. |
addFooter(footerText: FormattedText, bottomMargin: float) | Adds a text footer to all pages. |
addFooter(footerText: FormattedText, bottomMargin: float, leftIndent: float, rightIndent: float) | Adds a text footer to all pages with explicit left/right indents |
| (mirrors the C# {@code AddFooter(FormattedText, float, float, float)} | |
| 4-arg overload used by PDFNEWNET-28949 and similar tests). | |
addFooter(imageFile: String, bottomMargin: float) | Adds an image footer to all pages. |
addHeader(headerText: FormattedText, topMargin: float) | Adds a text header to all pages. |
addHeader(imageFile: String, topMargin: float) | Adds an image header to all pages. |
addPageNumber(formattedText: FormattedText) | Adds a page number stamp to all pages using the supplied formatted text |
| as the source for text value and text state. | |
getStampId() → int | Returns the stamp id used by convenience stamp helpers. |
setStampId(stampId: int) | Sets the stamp id used by subsequent convenience stamp helpers. |
getStampCount() → int | Returns the number of stamps that have been added. |
save(outputFile: String) → boolean | Saves the bound document to a file. |
save(outputStream: OutputStream) → boolean | Saves the bound document to an output stream. |
close() | Closes the stamp editor and releases the bound document. |
Voir aussi
- Aspose.PDF pour Java — API d’entreprise