Database to document

PDF and Word Generator API

PDF and Word Generator API

Businesses create a variety of documents from their enterprise systems such as CRM, ERP, SCM, etc. The most common approach for the development of document automation functionality is by coding for each document template inside the core systems. It makes the code less modular and inflexible. Moreover, every time a template changes, the associated code require modifications.

PDF generator API extends the enterprise application's core functionality in generating documents. Thus you can automate document generation from CRM, ERP and other front and back-office applications. Benefits include

  1. Since it supports on-demand document generation, this allows the creation of complex workflows
  2. For mobile apps, document creation outside the device reduce performance overheads, saves battery life and improves scalability.
  3. Using an external API that addresses various special scenarios and complex templates saves a lot of development time and effort.

One of the USPs of EDocGen PDF generator API is your business users can use existing templates. They can create/edit templates in their favorite Word and PDF editors without seeking IT intervention.

EDocGen Word and PDF Generator API

EDocGen offers REST API that allows you to generate PDF and Word documents from various data sources including

  1. XML, JSON, and Excel data
  2. Databases including SQL and Oracle
  3. Enterprise systems
Using API, you can distribute generated documents through email, e-sign, print, and sync to cloud storage.

EDocGen is API first product and you can do pretty much everything that you can do with the online app. This includes the dynamic population of

  1. Text
  2. Tables
  3. Hyperlinks
  4. Images
  5. Content Blocks

Apart from this, API also supports multi-lingual document templates, Arithmetic calculations, conditional statements (if-else) that allow you to generate proposals, invoices, contracts, etc. without any manual intervention.

EDocGen PDF generation API is built for high performance and generate thousands of complex documents in a few seconds. Since the API calls are asynchronous, you can initiate high volume requests to generate millions of documents.

Using EDocGen, you can also create one document at a time. This is useful if you want to have a form on your website and filling it by users creates a document.

Programming Language Support

EDocGen Word generation REST API can be consumed either as SAAS or can be deployed on your existing servers to accommodate your specific performance and security needs. With the RESTful API, the document generation is not married to the application. The application makes a call to the API server and the API returns the desired output.

REST API offers an elegant, flexible solution to generate PDF and Word documents using PDF and Word templates from practically any programming environment. It doesn’t matter what language and platform you are using because you make browser calls to API working in your preferred programming environment :

  1. JavaScript
  2. PHP
  3. Python
  4. Ruby
  5. Java
  6. C#
  7. VB.NET

Frequently Asked Questions

Does my account give access to API?

If you have an active EDocGen account then you may use the API.

Does your API support my programming language?

If your language is able to send HTTP requests and receive HTTP response, then yes. This isn't a problem for modern languages.

What Dynamic field types EDocGen supports

EDocGen supports the dynamic population of Text, Tables, Hyperlinks, content blocks and Images. Apart from this, it also supports conditions (if-else) and calculations using basic arithmetic operations

Can I generate PDF documents

Yes. You can use both Word templates and fillable pdf templates for pdf document generation.

What are the delivery options available for assembled documents

1. Download generated documents in zip/docx formats

2. Email generated file

3. Sync generated files to Google drive

Document Generation API Endpoint


EDocgen uses token-based authentication. Register with EDocGen portal and call /login to authenticate your credentials and obtain the token.



"username": "string",

"password": "string"


Once you obtain token, you can use to make other API call by passing it in the header.

API Elements

Please refer to for API documentation. EDocGen MS Word and PDF generator API elements include

  1. Uploading template
  2. Get templates details
  3. Get markers/dynamic fields in a template
  4. Image upload
  5. Content Block upload
  6. Bulk document generation from XML/JSON/XLSX
  7. Generated Files Details
  8. Download generated files
  9. Email generated files


Below is sample template

Document Generation API template

Marker Format

{"markers":{"entry":[{"key":"university","value":"Put value for university here."}, {"key":"photoimg","value":"Put value for photoimg here."}, {"key":"name","value":"Put value for name here."}, {"key":"marksdata","value":"Put value for marksdata here."}, {"key":"exam","value":"Put value for exam here."}]}, "templateId":"54a24c6fe4b048a7e255b590"}

JSON Data Population

{"markers":{"entry":[{"key":"university","value":"University of California"}, {"key":"photoimg","value":"54a24cdfe4b048a7e255b592"}, {"key":"name ","value":"Anushka Sharma"}, {"key":"marksdata","value":"[['Maths','45'],['Science','65'],['Biology','75']] "}, {"key":"exam","value":"Diploma in Sciences"}]},"templateId":"54a24c6fe4b048a7e255b590"}

Popular Posts