iNotes to PDF with DominoPDF

Lotus iNotes is a rich Web client for Lotus Domino e-mail, calendar, and collaboration applications.

As iNotes is web based and makes heavy use of frames and JavaScript certain considerations have to be made when using DominoPDF for PDF conversion via an iNotes implementation.

DominoPDF is iNotes Browser Compatible

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 v.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.

Now that we’ve ensured iNotes recognises DominoPDF as a valid browser we need to retrieve the content we want converted to PDF

iFrame, Framesets and JavaScript

As iNotes makes heavy use of framesets, iframes and javascript, we need to access the required content directly.

We could try referencing an ?OpenDocument URL directly, however iNotes will by default wrap any requests in the iNotes framed interface.

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

In this manner we can return HTML without the iframe, frameset, javascript, etc.

Web Proxies and Authentication

Depending on your iNotes installation and configuration it may be necessary to connect via a Web Proxy.

Fortunately, DominoPDF allows a Proxy Server and authentication to be specified by using the WebProxyServer, WebProxyPort, WebProxyUsername and WebProxyPassword options.

Comments are closed.