PdfFileMend

Overview

PdfFileMend is a class in Aspose.PDF FOSS for .NET. Inherits from: ISaveableFacade.

Facade for adding text and images to existing PDF documents.

This class provides 23 methods for working with PdfFileMend objects in .NET programs. Available methods include: AddImage, AddText, BindPdf, Close, PdfFileMend, Save. All public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package. Properties: InputFile, InputStream, IsWordWrap, OutputFile, OutputStream, TextPositioningMode, and 1 more.

Properties

NameTypeAccessDescription
IsWordWrapboolRead/WriteWhether to enable word wrapping for AddText operations.
WrapModeWordWrapModeRead/WriteWord wrap mode (Default or ByWords).
TextPositioningModePositioningModeRead/WriteText positioning mode.
InputFilestring?Read/WriteInput file path.
OutputFilestring?Read/WriteOutput file path.
InputStreamStream?Read/WriteInput stream.
OutputStreamStream?Read/WriteOutput stream.

Methods

SignatureDescription
PdfFileMend()Default constructor.
PdfFileMend(inputFileName: string, outputFileName: string)Create a PdfFileMend from input/output file paths.
PdfFileMend(inputStream: Stream, outputStream: Stream)Create a PdfFileMend from input/output streams.
PdfFileMend(document: Document)Bind a pre-loaded Document.
PdfFileMend(document: Document, outputFileName: string)Bind a document and pre-set the destination file path.
PdfFileMend(document: Document, destStream: Stream)Bind a document and pre-set the destination stream.
BindPdf(document: Document)Bind an existing Document to this PdfFileMend.
BindPdf(inputFile: string)Bind a PDF document from a file path.
BindPdf(inputStream: Stream)Bind a PDF document from a stream.
AddText(text: FormattedText, pageNum: int, lowerLeftX: float, lowerLeftY: float)Add formatted text to a specific page at the given lower-left position.
AddText(text: FormattedText, pageNum: int, lowerLeftX: float, lowerLeftY: float, upperRightX: float, upperRightY: float)Add formatted text to a specific page within the given rectangle.
AddText(text: FormattedText, pageNums: int[], lowerLeftX: float, lowerLeftY: float, upperRightX: float, upperRightY: float)Add formatted text to multiple pages within the given rectangle.
AddImage(imageStream: Stream, pageNum: int, lowerLeftX: float, lowerLeftY: float, upperRightX: float, upperRightY: float)Add an image from a stream to a specific page.
AddImage(imageName: string, pageNum: int, lowerLeftX: float, lowerLeftY: float, upperRightX: float, upperRightY: float)Add an image from a file path to a specific page.
AddImage(imageStream: Stream, pageNums: int[], lowerLeftX: float, lowerLeftY: float, upperRightX: float, upperRightY: float)Add an image from a stream to multiple pages.
AddImage(imageName: string, pageNums: int[], lowerLeftX: float, lowerLeftY: float, upperRightX: float, upperRightY: float)Add an image from a file path to multiple pages.
AddImage(imageStream: Stream, pageNum: int, lowerLeftX: float, lowerLeftY: float, upperRightX: float, upperRightY: float, compositingParameters: CompositingParameters)Add an image with compositing parameters (blend mode).
AddImage(imageName: string, pageNum: int, lowerLeftX: float, lowerLeftY: float, upperRightX: float, upperRightY: float, compositingParameters: CompositingParameters)Add an image with compositing parameters (blend mode).
AddImage(imageStream: Stream, pageNums: int[], lowerLeftX: float, lowerLeftY: float, upperRightX: float, upperRightY: float, compositingParameters: CompositingParameters)Add an image with compositing parameters to multiple pages.
AddImage(imageName: string, pageNums: int[], lowerLeftX: float, lowerLeftY: float, upperRightX: float, upperRightY: float, compositingParameters: CompositingParameters)Add an image with compositing parameters to multiple pages.
Save(destFile: string)Save the modified document to a specific file path.
Save(destStream: Stream)Save the modified document to a stream.
Close()Close the document and save to the output file/stream.

See Also