XML to Word fill

How to Convert XML to PDF Document

Populate XML to PDF templates

Most of the IT systems and databases allow you to export data in XML format. XML is the universal standard for data interchange, storage, and analysis. On the other hand, PDF is the most popular document format. It is a convenient, print-ready cross-platform format for publishing documents.

Often times you find a need to populate XML file to PDF template to create PDF documents. So a tool that automates XML file to PDF population enhances productivity and can add great value.

Most of the PDF documents are created either for compliance purpose or for. So it's very important that XML to PDF automation solution create PDF documents without any deviation from corporate branding guidelines.

XML to PDF Demo

XML file to PDF - Approaches


There are different approaches to achieve this. The prominent ones include XSL:FO, XHTML specification, DocBook implementation, XFA. The most popular way is to write XML in XSL-FO and use a formatter to render in PDF format.

XML + XSLT(fo specific ) -> XSL FO -> Apache FOP -> PDF

All the above approaches require you to employ an IT team for populating XML to PDF templates. Getting time from resource-constrained IT team is difficult. Moreover, the templates undergo changes. So these are expensive both from a development and maintenance perspective. Empowering business users to have complete control over templates improves the overall business performance.


Why EDocGen

If you are looking for a DIY system to generate documents from XML data then EDocGen is the solution to go with. It is the simplest and fastest way for business users to fill PDF or Word templates with XML data to create PDF documents.

XML to PDF Document Generation

It supports the dynamic population of text, tables, content blocks, hyperlinks and images from XML data. It also supports multi-lingual templates, conditional statements (if-else), and calculations. With an intuitive interface, you can map the dynamic fields of the document to XML data thus controlling the data you wish to show on your document.

EDocGen supports both on-demand and bulk document generation. Following sections describe how to convert XML to PDF using EDocGen.

There are two ways to populate XML file to PDF using EDocGen - Through App UI and API.

App UI - XML to PDF Documents


The first step is to add relevant tags to dynamic fields - text, tables, hyperlinks, images, text areas, content blocks into the template. EDocGen uses these tags to identify the dynamic sections of the template. After this, upload template into EDocGen. You can use your favorite PDF editor for adding tags.



After upload, you can see your template in EDocGen. Hover over document template and click “Create Document” action button. This opens a screen and in the drop-down select “generate documents from XML". Upload XML and map XML elements to template's dynamic fields. Choose output document format as PDF and click generate button to create bulk documents in zip format in the output folder.

XML to PDF Document Generation


As you can see, you can use your existing XML without any data transformation for XML to PDF document creation using mapping screen. If you use the same XML file structure, again and again, mapping it every time is time-consuming particularly if you have a large number of dynamic fields in your template.

If node names match with template's dynamic fields, EDocGen automatically maps them. So you can skip the mapping screen and click generate button to create documents.

Mapping screen

Please refer to working example for a detailed account of how to go about XML to PDF document population.

API - XML file to PDF Document Generation

EDocGen is API first product. Using simple REST-based API, you can deliver stunning proposals, invoices, reports, letters, etc. right from your application and databases. The API performance and scalability benchmarks are pretty impressive. You can generate thousands of documents in a few minutes.

Whether you are creating a single document or multiple documents, EDocGen is the best solution for converting the XML file to PDF. Register and start populating your XML data into PDF / Word template.

Give it a try. The trial is better than reading 1000 words.

Popular Posts

JSON because of its lightweight is fast becoming the de-facto standard for data-interchange

How to export Excel to Word

Posted by admin

Almost every business user at some point in time would have copied data from excel to word