RenderX

HTML to PDF

Generate print-ready PDF, PostScript, and AFP from web applications, either by converting HTML through XSL-FO or by formatting directly from the source data.

Web applications often need fixed-layout output alongside their HTML pages — most commonly PDF — for printing, archiving, and regulated record-keeping. HTML is designed for on-screen viewing and reflows with the browser; a PDF gives you exact control over the layout and a document that stays the way you published it.

Two ways to get there

IRen takes either XSL-FO or an XML/XSLT pair as input and produces PDF, PostScript, AFP, and other output formats. Because well-formed HTML (XHTML) is itself XML, that opens two paths:

Sequential: HTML → XSL-FO → PDF. When the PDF should closely match the web page, apply an XSL transformation to the XHTML to produce XSL Formatting Objects, then let IRen format the result. You supply the HTML file and a stylesheet; the engine does the rest.

Parallel: XML → HTML and XML → PDF. Most web applications generate their pages from a data source — a database or XML. If the print version should differ in style from the web version, skip the HTML entirely and format directly from the same source data with its own stylesheet.

Fitting it into your stack

IRen is a Java engine you can call programmatically from any web server technology — Java, ASP.NET, Python, Ruby, and others. For services that generate documents at scale, IRen InGrid puts a grid of engines behind a REST API your application can POST to. If you would rather not run the engine at all, CloudFormatter provides hosted XML and HTML to PDF conversion as a web service. VisualXSL can be used to build the XSLT stylesheets visually.

Ready to add PDF output to your application? Contact sales or purchase through the shop.