April 8, 2015 at 18:51#27004
I am evaluating pd4ml. I have downloaded a few different version and I am comparing the resulting PDF generated from the same source web page and am seeing a significant difference in how it is rendered. In all cases I used the command line to generate the PDFs. I am currently using Java 8 on Windows 8.1 for the versions that require Java.
I created a PDF using:
Option 1 rendered the page fairly well and was the closest to the original HTML page. Option 2 and 3 both did a terrible job rendering the page. Images were laid upon each other, tables were truncated, and many other styles were ignored or misinterpreted.
The original page contains data URIs for images and css.
To be honest I wasn’t sure what the differences other than version were between all the different download choices so I tried several of them.
Am I using the correct versions? Are others experiencing the anything similar?
Thank you.April 9, 2015 at 14:35#29698
PD4ML Std and Pro were never positioned as a solution for web sites capture. The 100% Java libraries allow you to define (or auto-generate) a PDF document template layout an easy way with a markup language everybody knows: HTML. As a pure Java solution it has its performance drawbacks and limitations – it just cannot compete in a page rendering quality with major web browsers when converting interactive media-rich web sites.
PD4ML Web is intended to address the issues of Std/Pro, but unfortunately has its own limitations. It is built as a wrapper for PhantomJS/Webkit (native platform executable) runtime and exposes PD4ML API for Java applications. It utilizes print/PDF export subsystem of Webkit. An advantage of the approach is very good HTML rendering quality, but its PDF output is quite basic and not optimized: no support for hyperlinks, outlines, attachments, no flexibility with header/footer definitions, fonts are not shaped etc. PD4ML applies some post-processing to Webkit PDFs, but some issues are still there. And one of the major issues: calls to a native binary do not comply with J2EE guidelines.
So you’ve got a choice:
PD4ML Std/Pro – for an automatic reporting, invoice, documentation generation etc. You only need to drop a couple of JAR files to your application shared lib/ dir and the functionality is instantly available.
PD4ML Web for web site capture (probably for archiving purposes). In the case you would additionally need to install PhantomJS binary and to point to it from your application.
The forum ‘HTML/CSS rendering issues’ is closed to new topics and replies.