Hi. Another choice is to use
wkhtml2pdf (very similar to PrinceXML). wkhtml2pdf has the added advantage to run Javascript. I know this is more than you require but if you wanted to produce an a "High Quality" chart, then use
HighCharts.
HighCharts will dynamically rendered a chart from data from your database and display it in your Internet Browser (IE, FF, CHROME, etc).
This is what I've started using myself. My design requirement was to produce an online report which managers could "Drill Down" (there words not mine) and then produce a PDF document which included a Cover Page, Table of Contents, Headers & Footers.
Using WebSpeed I was able to produce the web report and generate the PDF document using the same webspeed code. No need to write separate code for web and one for PDF, it's all the same.
The reason I am using wkhtml2pdf are:
- It's free. GNU General Public License v3
- Reusable code for both Web and PDF
- Headers and footers are automatically inserted for each page of the PDF
- Automatically can generate a Table of Contents at the start of the PDF Document.
- I can include charts rendered by HighCharts which can be displayed in the PDF as PDF Vector Graphic rather than bitmap image.
- The wkhtml2pdf project is very active with new releases every few months.
- Good support from the project's forum.
- The latest version now correctly handles page breaks and a content being broken up as it spans across two pages.
How does
wkhtml2pdf work.
wkhtml2pdf for starters is cross platform compatible (Linux, Windows, MacOS). You simply run
wkhtml2pdf from the command line (i.e. from WebSpeed OS-COMMAND statement) and passes the URL of your HTML report and pass a second parameter of the name of the Outputted PDF file. Then using
CyrixInstead
code, upload the newly created PDF file. Done.
Before anyone berates me for advertising
I have no affiliation with HighCharts and/or wkthml2pdf. These are just products which I am using internally for my own projects and they work and works really well for my company's requirements.