I've created 2 PDF files with DominoPDF but I'd like them in 1 PDF. Can this be achieved?

A function called DomPDFMerge allows you to merge existing PDF files together. The function has been designed to work with PDF files generated from DominoPDF itself, however it typically works on external PDF files too but is not guaranteed.

For example;

Declare Function DomPDFMerge Lib "DOMINOPDF.DLL" (Byval szInput As String, Byval szOutput As String) As Long

Call DomPDFMerge(sInput, sOutput)

Alternatively, just pass both URL's to DominoPDF (separated by a semi-colon) and you'll get a single PDF file output.

If you need to process a large number of separate URLs or files then the LotusScript method may truncate your input. It is possible to call the DoPDF method in a loop to create separate PDF files for each input. Then merge the resulting PDF files into a single PDF with the DomPDFMerge method.

However another way of handling a long list of input values is provided by DominoPDF. The list of input values can be written to a file with an extension of *.domp and when this is passed to DominoPDF each item is processed in turn and output to a single PDF.

LotusScript can be used to write the values out to the file as in the example below.

Sub Initialize
Dim fileNum As Integer
Dim fileName As String

fileNum% = Freefile()
fileName$ = "c:\data.domp"

Open fileName$ For Output As fileNum%
Print #fileNum%, |http://www.google.com|
Print #fileNum%, |http://www.dominopdf.com|

Close fileNum%

Call DoPDF(|c:\data.domp|, |c:\test.pdf|, ||)
End Sub

The *.domp file can be mixed with other input values as appropriate. For example;

Call DoPDF(|http://localhost/names.nsf/Home?OpenForm;c:\data.domp;c:\disclaimer.pdf|, |c:\test.pdf|, ||)