BOOKMARK & SHARE Bookmark and Share
RSS RenderX RSS
The Future of Your Document Is Here
RenderX logo
Contact Us

Free Personal Edition!

XEP 4
Free software for
non-commercial use:
Free XEP Personal Edition!

More information...

HTML to PDF: Using RenderX XEP to Generate PDF Output in Web Applications

RenderX XEP processor can be used to convert HTML (XHTML) to PDF, PostScript, or any other output format supported by XEP. Depending on the Web application design, Web server setup and the chosen technology and the project's requirements, PDF can be produced sequentially (X)HTML -> XSL-FO -> PDF, or directly from the source data (database or XML, for example) which is used to generate Web pages.

HTML to PDF: General Concept

XEP Formatting Engine

XEPWin Formatting Engine

EnMasse: Scalability and Connectivity

Integration & Connectivity Kit

HTML to PDF: General Concept

Many Web applications need to generate fixed-layout output - most likely in the PDF format - for various reasons: printing, archival, faxing, etc. Fixed-layout outputs have their advantages over HTML, which is intended to mark up pages that should be viewed on screen. You may choose to use them, because you may need better control over the layout or do not want the output to be changed. You may also decide to standardize on PDF, for example, because this format can be easily converted to some other form - TIFF for faxing, for example.

XEP - RenderX's XSL-FO formatter - takes either XSL-FO or an XML/XSLT pair as input and produces documents in the PDF, PostScript, and other formats. You can call XEP programmatically from any Web server technology - Java, ASP.NET, Ruby, Python, etc.

Because XML and HTML have a lot in common, HTML can be easily converted to XSL-FO through some kind of transformation. One of the most common ways to perform such transformation is to apply XSLT.

A well-formed HTML (XHTML) file is essentially an XML file. So if you choose to use an XSL transformation process, you can simply specify the HTML and XSLT files that you would like to be transformed to PDF.

Another way to produce XSL-FO is to use the CSSToXSLFO free utility.

Sequential Method: HTML (XHTML) -> XSL-FO -> PDF

Many Web applications generate Web pages from some data source, such as a database or XML.

Dynamic Generation of HTML Output from XML

In some cases, you may need to produce PDF pages that closely match the HTML output. In this case you may choose to use RenderX formatting solutions in a sequence as the diagram below shows.

Sequential Method: HTML (XHTML) -> XSL-FO -> PDF

Parallel Method: XML -> HTML (XHTML) and XML -> PDF

 

If your Web application uses some data source - such as XML or database - to generate HTML output, you may consider generating PDFs directly from the source data. This approach can be beneficial, if you would like to have the PDF output to differ in style from the HTML version.

Parallel Method: XML -> HTML (XHTML) and XML -> PDF

VisualXSL

RenderX VisualXSL – a graphical XML report editor – can be used for visual development of XSLTs which can be used for PDF generation with XEP/XEPWin.

News

April 1, 2024
No xz-utils in RenderX products

No xz-utils in products.
We continuously monitor.
Always update to latest.
More news...


August 11, 2022
New Product Release: InGrid 1.0

EnMasse replacement:
More secure, faster;
plus REST API;
pure Java.
More news...


June 21, 2022
EnMasse 3.4 released

Security fixes:
No 64-bit SSL ciphers, XSS;
improved logging.
More news...


December 23, 2021
No Log4j in RenderX products

No Log4j in products.
We continuously monitor.
Always update to latest.
More news...


October 15, 2020
EnMasse 3.3 released

HTTP/1.1 server status;
performance improvements;
improved logging.
More news...


RenderX RSS RSS: Subscribe

Add to MyYahoo!