XML with PDF fill

PDF Generation - XML Merge

XML Merge to PDF

Many of us are familiar with mail merge - merging Excel data with word template to produce documents in batch. How about merging XML data to PDF or Word templates? XML is the universal standard for data interchange. PDF and Microsoft Word are the most popular document formats. Often, you find a need to populate the XML file to these templates for bulk document generation.

With EDocGen, you can populate XML data into

  1. Word Templates
  2. Fillable PDF Templates
  3. Read-only PDF Templates

Sample PDF generation from XML

Below are the XML file and the sample Word template.


XML to PDF Document Generation

In the XML file, notice XML tags names match with the template's dynamic field names. For example, "Enter_Name" is present in both XML and template. Having matching XML tags allows you to skip the mapping screen (2nd step of the population). Thus this saves time if you're planning to populate the same XML format multiple times into your template.


Dynamic Tags


The template has dynamic text, table, and image fields, apart from calculations and conditional statements.

Text: {Enter_Name} and {Enter_Email} are dynamic text fields. EDocGen treats text placed in "{}" as dynamic text field.

Table: The Job table has Role, Company and Address columns. Table starts with {#tablename} and ends with {/tablename}. So you notice {#Job} in the first column and {/Job} in the last column. Column values are like text fields. The system loops over the XML to populate rows into the Job table.

Image: The image tag {%photoimg type="image"} populates the dynamic image. The image dimensions are optional and they automatically resize the image to the desired dimensions. The image from the URL location in the XML file gets populated during PDF generation.

Show text based on Conditions (If-Else): If the Enter_Name value is "Steve", we're showing some text. Similarly, you can also test for boolean for displaying certain content.


EDocGen logo

A few points on adding tags.

  1. Make sure you close the tags properly and don't leave any space between dynamic field name and tags
  2. Avoid special characters and spaces in field naming
  3. If a field appears at multiple places in the document, use the same dynamic field name throughout the document.

Upload the template into the system, after adding the tags.




Click on the "Generate" button against the uploaded template and select the "Upoad data" option from the pop-up.


XML file Population


XML format template

Upload XML and map XML tags to the template's dynamic fields. If you have a large number of dynamic fields, mapping them for every population is time-consuming. If XML tags names match with the template's dynamic fields, EDocGen automatically maps them. This allows you to skip the mapping screen during documents creation.


Clicking on the generate button creates bulk documents in zip format in the output folder and they would be mailed to your registered email id as well.



XML PDF and Word Converter


You can use both PDF and Word templates with EDocGen. Edit them in your favorite editors to add tags and upload them to the system. While you can also modify your templates inside the App, it is suited more for minor changes.

XML to Word

With EDocGen, you can populate XML into

  1. Word templates to create Word documents
  2. Word templates to create PDF documents
  3. PDF templates to create Word documents
  4. PDF templates to create PDF documents






Fillable PDF

Add tags in the fillable form fields and upload into EDocGen. Then generate PDF documents with XML, similar to as shown with Word templates.


fillable PDF Document Generation

Read-Only PDF

If you've Adobe editor, open the template in it. If you don't have that, you can use any of the free online editors. Then add the tags and generate PDF with XML as in with Word templates.


Advanced Features

Nested Tables:

You can populate table inside table and EDocGen supports 4-Level XML data

Checkbox:

Please refer for details on how to go about Checkbox creation and population.

Images:

Help guide details image population.

Paragraphs:

Content blocks help article details paragraph population.

Calculations:

Please refer to examples for details on how to perform calculations

Hyperlinks:

The system treats text placed in "{~}" as a hyperlink. In the template {~Enter_Email} creates a dynamic hyperlink.


Trouble Shooting

  • Unable to upload template

    It may be due to the wrong dynamic tags. Just make sure you're closing every tag properly and only use the tags that are supported by EDocGen. Also, ensure no spaces between tags and field names

  • After XML upload, the mapper screen doesn't show XML tags in the dropdown

    This happens if your XML is not well formated. Check XML file formatting.

  • After XML upload, the next button doesn't work

    This happens if your XML is not well-formatted. Check XML file formatting.

Popular Posts