Configuring PD4ML

You can configure an HTML report to render as a PDF document during runtime. See PDF report options for HTML Template reports for more information.

PD4ML is a tool that uses HTML and CSS (Cascading Style Sheets) to generate PDF. You can control PDF page size, orientation and page breaks, dynamic headers, footers, and page numbering.

Note: PD4ML rendering from HTML page to PDF is done at the server side of production servers. While rendering the page, pd4ml may have to use styling via CSS files or generate links to Platform pages. These resources are accessed/served via system's external URL. So, in order for PD4ML to work completely, it's necessary that backend of production servers is able to access system through the server's external URL.

After you install Platform, set the node property font directory in all production servers.

Platform configures the PD4ML font properties during server initialization. As part of the configuration procedure, it will search for the pd4fonts.properties file in the <ROLLBASE_HOME>/config folder. If not found, Platform uses the font directories provided in the node-config.json file to configure the pd4fonts.properties and the in-process pd4browser.propertiesin the <ROLLBASE_HOME>/config folder.

The first available font directory with valid font files of type " *.tt" &" *.ot" will be used. This includes files with extension .ttf, .ttc, .otf and any other such font files.

Note: The configuration will happen only if the PD4ML jar is in the Platform lib directory.

Platform will not re-configure the PD4ML font properties if the font properties file is found under the <ROLLBASE_HOME>/config folder. In case it needs to be re-created, it has to be manually deleted followed by a Platform restart.

Additionally, the master admin can also configure a list of font aliases which constantly append to the pd4fonts.properties file. For this purpose, add a file named pd4mlFontAliases.properties along with the font aliases and their corresponding TTF files in the <ROLLBASE_HOME>/config location. Once done, whenever the master tenant re-configures the fonts, this list of font aliases gets auto-appended at the end of the pd4fonts.properties file.

Note: As the property keys comprises a unique value, if there is any duplicate property key while appending the pd4fonts.properties file, the latest appended property key value is considered.