setHtmlTemplate() works in the trial versions. But it is a feature of PD4ML Pro, so first make sure you use Pro version of the software.

The simpliest way to check that is to run PD4ML in GUI mode and to open About dialog:

[language=java:3j8ekjgx]java -jar pd4ml_demo.jar[/language:3j8ekjgx]
Also try to set header.setAreaHeight( -1 ); to autocompute the header height. You use 20pt height, which may be too low for the header table (only table margins fit the space; the content is clipped)