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
| Name | Type | Access | Description |
|---|---|---|---|
IsWordWrap | bool | Read/Write | Whether to enable word wrapping for AddText operations. |
WrapMode | WordWrapMode | Read/Write | Word wrap mode (Default or ByWords). |
TextPositioningMode | PositioningMode | Read/Write | Text positioning mode. |
InputFile | string? | Read/Write | Input file path. |
OutputFile | string? | Read/Write | Output file path. |
InputStream | Stream? | Read/Write | Input stream. |
OutputStream | Stream? | Read/Write | Output stream. |
Methods
| Signature | Description |
|---|---|
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. |