JSON to doc fill

JSON to PDF and Word documents

Samples

Below are the JSON array for population and the sample template containing dynamic text, tables, and hyperlinks.

JSON to PDF Document Generation

In the JSON file, notice matching keys with dynamic tag names of the template. For example, "Enter_Name" is present in both JSON and template. Though you can upload any valid JSON format, having matching keys allows you to skip the mapping screen (2nd step of the population). Thus this saves time if you're planning to populate the same JSON file format again-and-again into your template.

For "linkname" dynamic field, there is no corresponding data in JSON. In such cases, the generated documents display just blank in the place of dynamic field.


Word /PDF templates


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

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.

EDocGen logo

Dynamic Tags


The template has text, table and hyperlink dynamic fields

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 text fields. EDocGen loops over the JSON to populate a row into the Job table.

Hyperlink : The dynamic data passed to hyperlink tag would be displayed as a link in blue color. You can use it display a URL or text that links to another URL. EDocGen treats text placed in "{~}" as hyperlink. In the template {~linkname}{~Enter_Name} are dynamic hyperlinks.

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.



Advanced Features

Nested Tables:

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

Checkbox:

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

Images:

Help guide details image population.

Paragraphs:

Help guide details paragraph population.

Calculations:

Please refer to examples for details on how to perform calcualtions.



Trouble Shooting

  • Unable to upload template

    It may be due to wrong dynamic tags. Just make sure you're closing every tag properly and only uses the tags that are supported by EDocGen

  • After JSON upload, the mapper screen doesn't show JSON keys in drop downs

    Please validate your JSON file. This happens if your JSON file is not valid.

  • After JSON upload, next button don't do any action

    Please validate your JSON file. This happens if your JSON file is not valid.


Additional Examples


Below is additional example for 2-level JSON population. The sample template has loops inside a loop to create a single page for each JSON record with bullets and lists.

Below are the template and JSON array.



The system loops over all the nouns in the JSON to populate associated records for each noun in the template. In the template notice the loop {#Nouns}{/Nouns}

      1. This document display dynamic bullets for "Examples", "Synonyms" and "Antonyms". So each of them is a loop with a bullet inside the loop. This is a case of loop inside a loop.

    {#ExampleSentences} {.}{/ExampleSentences}

      2. "{.}" would display each element of the array as a bullet point