The DomPDFMerge function is used to merge two or more existing PDF files into a single PDF file.
Note: The DomPDFMerge function does not support merging of encrypted PDF files. If merging of encrypted PDF files is required please contact Primeapple for details.
LOTUSSCRIPT
Declarations
Declare Function DomPDFMerge Lib "DOMINOPDF.DLL" (Byval szInput As String, Byval szOutput As String) As Long
Return Value
Returns 0 if successful or -1 if unsuccessful.
Syntax
szInput - A semi-colon (;) delimited list of file names and paths of PDF files to merge.
For example;
c:\test.pdf;c:\my documents\contacts.pdf;sales.pdf
szOutput - The file name and path of the merged PDF file to be generated.
For example;
c:\contacts.pdf
c:\my documents\contacts.pdf
Example
Sub Initialize
'Declare variables...
Dim sInput As String, sOutput As String
'Set values...
sInput = |c:\test.PDF;c:\test2.PDF|
sOutput = |c:\merged.pdf|
'Error handler...
On Error Goto Error_Handler
'Merge PDF files...
Call DomPDFMerge(sInput, sOutput)
The_End:
Exit Sub
Error_Handler:
Print Error$
Resume The_End
End Sub