Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Can I convert HTML pages to PDF with the Report Generator?

0
Posted

Can I convert HTML pages to PDF with the Report Generator?

0

Not directly. HTML comes in lots of different flavours, whereas the Report Generator uses its own XML (similar to XHTML, but with a few extensions and exceptions specific to PDF). You cannot parse arbitary HTML with the Report Generator – it will require some transformation, e.g. the top level tag is not . The “SampleTransformer.java” example in the download package shows one way to convert these tags, and the userguide has a useful section on “Migrating from HTML”. The Report Generator conforms to the CSS2 specification, so if your HTML documents use CSS2 style sheets to separate content from presentation, the transformation will be simpler. The Tidy package, which converts HTML to XHTML, may help your conversion.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123