PDFMerger¶
Namespace: O2S.Components.PDF4NET.Utilities
Utility class for fast merging of PDF files.
Inheritance Object → PDFMerger
Constructors¶
PDFMerger()¶
Initializes a new PDFMerger object.
Properties¶
DocumentInformation¶
Gets or sets the document information.
Property Value
PDFDocumentInformation
The document's metadata.
Methods¶
AppendFile(String, String)¶
Appends the given file to the merged file.
Parameters
fileName String
PDF file to append.
password String
Password if the input file is encrypted.
AppendFile(Stream, String)¶
Appends the given file to the merged file.
Parameters
input Stream
PDF file to append.
password String
Password if the input file is encrypted.
AppendFile(PDFFileEx)¶
Appends the given file to the merged file.
Parameters
pdfFile PDFFileEx
PDF file to append.
Remarks
After calling this method the 'pdfFile' object is no longer valid
MergeFiles(String, String[])¶
Merges multiple PDF files into a single one.
Parameters
outputFile String
Path to file where to save the merged file.
inputFiles String[]
Array of files names representing the PDF files to merge.
MergeFiles(Stream, Stream[])¶
Merges multiple PDF streams into a single one.
Parameters
output Stream
Stream where to save the merged file.
input Stream[]
Array of steams that contain the PDF files to merge.
Save(String, PDFSecurityHandler, Boolean)¶
Saves the merged file to given file.
Parameters
fileName String
Path to file where to save the merged file.
securityHandler PDFSecurityHandler
Security handler for encrypting the merged file.
enableObjectCompression Boolean
True if the merged file should compress the PDF file structure.
Save(Stream, PDFSecurityHandler, Boolean)¶
Saves the merged file to given stream.
Parameters
output Stream
Stream where the merged file will be saved.
securityHandler PDFSecurityHandler
Security handler for encrypting the merged file.
enableObjectCompression Boolean
True if the merged file should compress the PDF file structure.