PD4ML can be used to convert IBM Notes documents to PDF (as well as to RTF or to a raster image) a variety of ways.
The most straightforward method is to capture HTML documents, returned by Notes Domino via HTTP: an URL like one of the following is to be passed to
render() method of PD4ML.
If you run JSP infrastructure on IBM Domino server, another online method of PDF generation would be to use PD4ML JSP custom tag library (TODO).
If an online document generation method (involving HTTP, JSP etc) is undesired, there is a possibility to generate PDF documents from their XML representations (so called DXL).
DXL is an adaptation of XML used to describe, in detail, the structure and data contained in a Domino database. It describes data and design elements such as views, forms, and documents and provides a basis for importing or exporting XML representations of data to and from a Domino/Notes application.
Schematically a process of Notes document conversion to PDF can be seen like that:
java -Djava.awt.headless=true -Xmx512m -jar pd4ml.jar test.dxl 1200 -xsl notesdefault
The command line overrides the default Java memory heap size limit with
-Xmx512m. Here it is set to 512Mb.
On UNIX platform
-Djava.awt.headless=true allows to run the application on non-graphics-enabled servers or from remote ssh/telnet sessions.
test.dxl 1200 are DXL location and htmlWidth (virtual “browser” frame width) parameters.
On Win32 the path is enclosed, if needed, to double quotes, on UNIX – to single quotes.
-xsl notesdefault applies XSL stylesheet to the input document. In the case it refers to the built-in default DXL-to-HTML XSL, but it can be an URI of an arbitrary external stylesheet.
The default PDF document format: A4 / PORTRAIT
In the example 1200px width of rendered document will be mapped to 595pt widths of A4 page format.
As long as an output file path omitted, the output is sent to STDOUTand can be piped to another application.