Merges this PDF file with one or more PDF existing files with optional passwords for each file.
public void MergeWith(
PDFFile[] sourceFiles,
string destinationFileName
)
Public Overloads Sub MergeWith( _
ByVal sourceFiles() As Leadtools.Pdf.PDFFile, _
ByVal destinationFileName As String _
)
public:
void MergeWith(
Leadtools.Pdf.array<PDFFile^>^ sourceFiles,
String^ destinationFileName
)
sourceFiles
An array of PDFFile objects that contain the names and optional password of the source files to merge with this PDFFile. Must not be null and must contain at least one item and a maximum of 100 items.
destinationFileName
Name of the destination PDF file to be created. If the value of this parameter is null then the filename set in FileName will be updated.
This method will merge two or more existing PDF files to form a new file containing all the pages from the pre-existing PDF files. The new file will be constructed as follows:
The pages of the PDF file associated with this PDFFile object will be first
The pages of the first file in the sourceFiles list will be appended next
The pages of the second file in the sourceFiles list will be appended next
And so on for each item in sourceFiles.
All the PDF files must pre-exist on disk and must be valid. The sourceFiles parameter must not contain any null items.
To use this method, associate this PDFFile object with a valid PDF file and optional password. You can achieve this by either using the PDFFile(string fileName) or PDFFile(string fileName, string password) constructors or set the filename and optional password directly into the FileName and Password properties. You do not need to call Load before using this method.
This method will use the following properties of this PDFFile object:
DocumentProperties. If the value of this property is null, then default properties will be used
SecurityOptions. If the value of this property is not null, then the destination file will be encrypted using the properties of this property. If the value of this property is null, the result file will not be encrypted
CompatibilityLevel. The version of the generated PDF file
If one or more of the files to merge with are encrypted with a password, then set the required password in its PDFFile item in the sourceFiles array. If none of the files are encrypted, then you can use the MergeWith(string[] sourceFileNames, string destinationFileName) version of this method that allow you to pass a list of System.String's for the filenames instead.
For an example, refer to MergeWith.
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.