How do I know what Authentication method my server is using?

DominoPDF supports Basic HTTP Authentication and NTLM Authentication depending on which headers the web server returns.

By using the WebUsername and WebPassword attributes DominoPDF will pass authentication details as appropriate if the authentication protocol is supported.

If you are using a protocol DominoPDF does not support you can confirm this by enabling DominoPDF logging and examining the output.

To enable logging you can add an option to the DoPDF() method as follows;

Call DoPDF(sURL, sPDF, "WebUsername=joe;WebPassword=secret;LogFile=c:\domlog.txt")

How do I pass Domain details for NTLM Authentication?

- Pass a blank WebUsername and/or WebPassword and the current user credentials will be used (logon details from user machine).

- Pass WebUsername and WebPassword and the MachineName\WebUsername credentials will be used (MachineName from user machine).

- Pass WebUsername as "DOMAIN\Username" and WebPassword and the specified DOMAIN and credentials will be used.

How to control Font Embedding?

By default DominoPDF embeds fonts into the PDF.

The NoEmbedFonts setting in the DoPDF() method allows you to specify which fonts are not embedded into the PDF and therefore referenced directly.

Usage is as follows (and detailed in the help file);

Call DoPDF("http://...", "c:\test.pdf", "NoEmbedFonts=Barcode3of9")

Multiple fonts can be separated by using a * delimeter for example, NoEmbedFonts=Barcode3of9*Arial.

I get Error Loading DLL

When loading a DLL from LotusScript Notes needs to locate the DLL on the file system.

Software Path

Typically DominoPDF should be installed in the Notes software directory (same place as nnotes.exe), however it can also be placed in another directory as long as it is in the system path (for example \system32).

Explicit Path

You can also try specifying a direct path to the DLL. For example;

Declare Function DoPDF Lib "c:\lotus\domino\DOMINOPDF.DLL" (Byval szInput As String, Byval szOutput As String, Byval szOptions as String) As Long

64-Bit Platform

You may be using a 64-Bit operating system which needs to reference an alternate DLL. Please see our Knowledge Base entry at 64-Bit DominoPDF for further details.

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|, ||)

iNotes Browser Compatibility

iNotes only works with certified browsers and will return a "Lotus iNotes has not been certified to work with this browser." error message if a browser is unrecognised.

iNotes identifies a browser by its User-Agent and an accepted User-Agent can be specified for DominoPDF by using the UserAgent= setting.

For example;

Call DoPDF(sURL, sPDF, "UserAgent=Mozilla/4.0 (compatible* MSIE 7.0* Windows NT 5.2* .NET CLR 1.1.4322* .NET CLR 2.0.50727* .NET CLR 3.0.04506.30* .NET CLR 3.0.04506.648* .NET CLR 3.0.4506.2152* .NET CLR 3.5.30729)")

Note: as DominoPDF uses semi-colons (;) for option delimiters the semi-colons in a user agent string can be replaced with asterisks (*) and DominoPDF will substitute semi-colons accordingly.

iNotes Compatiblity

iNotes makes heavy use of framesets, iframes and javascript, which is not supported by DominoPDF.

Therefore when using the URL interface of DominoPDF all URLs should have the &ui=webmail argument appended to the end.

The &ui=webmail argument tells iNotes to output content in the original Domino webmail UI and provides HTML / DominoPDF compatible output.

For example;

http://localhost/mail/prime.nsf/0/102CE45A2C0C92B5C12576790034301F/?OpenDocument&ui=webmail

Lotus iNotes has not been certified to work with this browser

iNotes only works with certified browsers and will return a "Lotus iNotes has not been certified to work with this browser." error message if a browser is unrecognised.

iNotes identifies a browser by its User-Agent and an accepted User-Agent can be specified for DominoPDF by using the UserAgent= setting.

For example;

Call DoPDF(sURL, sPDF, "UserAgent=Mozilla/4.0 (compatible* MSIE 7.0* Windows NT 5.2* .NET CLR 1.1.4322* .NET CLR 2.0.50727* .NET CLR 3.0.04506.30* .NET CLR 3.0.04506.648* .NET CLR 3.0.4506.2152* .NET CLR 3.5.30729)")

Note: as DominoPDF uses semi-colons (;) for option delimiters the semi-colons in a user agent string can be replaced with asterisks (*) and DominoPDF will substitute semi-colons accordingly.

LotusScript FileExists Function

The DominoPDF DoPDF() method returns 0 (zero) for a successful operation and -1 for an unsuccesful operation.

So you can take the return value and test against this, for example;

iRet = DoPDF(sURL, sPDF, sOptions)
if iRet = -1 then Error = True

You can also use the LotusScript Dir$ function to check that the PDF has actually been created on disk and if not take appropriate action.

To make it even easier below is a FileExists() LotusScript method which you can use.

Function FileExists(sFileName As String) As Integer
'Declare variables..
Dim iPos As Integer, iPrevPos As Integer
Dim sFile As String

'Validate passed filename...
iPos = 0
Do
iPrevPos = iPos
iPos = Instr(iPos + 1, sFileName, "\")
Loop Until iPos = 0
iPos = iPrevPos

sFile = Right$(sFileName, Len(sFileName) - iPos)

'Check to see if file exists and return results...
If Dir$(sFileName) = sFile Then
FileExists = True
Else
FileExists = False
End If
End Function

Manually Install DominoPDF COM

To register the COM object please run the following.

$INSTDIR\DominoPDFCOM.exe /regserver

Where $INSTDIR is the COM file installation path. Once this is done please check the domcnfg once again.

If you cannot see the DominoPDF COM object after registering in the DCOMCNFG screen you may need to check the 32-bit DCOM config manager.

To configure 32-bit DCOM applications enter the following in a command line;

C:\WINDOWS\SysWOW64>mmc comexp.msc /32

Follow the interface security settings instructions as per the KB article.

Note: Be sure to run all /regserver and command line actions as an Administrator.

Page 5 of 7

JoomShaper