PdfFileMend

Vue de l’ensemble

‘PdfFileMend’ est une classe dans Aspose.PDF FOSS pour Java.Déduit de: ‘Closeable’.

L’héritage “mend” facade pour ajouter des images de raster et {@link FormattedText} annotations à PDF existants sans reconstruire la page du scratch.

Cette classe fournit 18 méthodes pour travailler avec des objets PdfFileMend dans les programmes Java. Les méthodologies disponibles comprennent: PdffileFend, addImage , adText ; bindPDF; ‘close : 'getDocument et ‘save. Tous les membres publics sont accessibles à n'importe quelle application Java après l'installation de l’Aspose.PDF FOSS pour le package Java . Propriétés : document‘.

Propriétés

NameTypeAccessDescription
documentDocumentReadReturns the bound document, or {@code null} when none is set.

méthodes

SignatureDescription
PdfFileMend()Empty {@code PdfFileMend}.
PdfFileMend(inputFile: String)Bound to {@code inputFile}.
PdfFileMend(inputFile: String, outputFile: String)Bound to {@code inputFile} and primed to write the result to {@code outputFile}
when {@link #save()} is called.
PdfFileMend(inputStream: InputStream, outputStream: OutputStream)Bound to streams; the input is parsed eagerly, the output is wired for {@link #close()}.
PdfFileMend(document: Document)Bound to an already-opened document.
save()booleanWrites the bound document to the file supplied via the
{@link #PdfFileMend(String, String)} constructor.
getDocument()DocumentReturns the bound document, or {@code null} when none is set.
setInputFile(inputFile: String)Mirrors C# {@code InputFile} setter: opens {@code inputFile} into a new {@link Document}.
bindPdf(inputFile: String)booleanLoads a fresh {@link Document} from {@code inputFile}.
bindPdf(inputStream: InputStream)booleanLoads a fresh {@link Document} from {@code inputStream}.
bindPdf(document: Document)booleanBinds an already-loaded document.
addImage(imageFile: String, pageNumber: int, llx: double, lly: double, urx: double, ury: double)booleanAdds the image at {@code imageFile} to {@code pageNumber} positioned at
the rectangle {@code [llx,lly] – [urx,ury]}.
addImage(imageStream: InputStream, pageNumber: int, llx: double, lly: double, urx: double, ury: double)booleanAdds the image content read from {@code imageStream} to {@code pageNumber}.
addText(text: FormattedText, pageNumber: int, x: double, y: double)booleanAdds {@code text} to {@code pageNumber} starting at {@code (x, y)} (PDF
user-space coordinates, origin at bottom-left).
addText(text: FormattedText, pageNumber: int, x: float, y: float)booleanBackwards-compatible float overload (matches the legacy C# signature).
save(outputFile: String)booleanSaves the bound document to {@code outputFile}.
save(outputStream: OutputStream)booleanSaves the bound document to {@code outputStream}.
close()Releases the bound document.

Voir aussi

  • Aspose.PDF pour Java — API d’entreprise
 Français