EazyDocs API
EazyDocs API can help you to create word and pdf templates, documents from json file. Each line of the document should be described properly according to rules shown below.
create word/pdf template - by defining each line of the document you can create a word/pdf document.
HTTP
curl -i -X POST "https://eazydocs.com/api/print-word"
curl -i -X POST "https://eazydocs.com/api/print-pdf"
Body raw (json)
{
"documentLines: [
{
"line_type": "table",
"order": 2
"data": [
"row1col1",
"row1col2",
"row1col3"
],
"column_size": [
20,
30,
5
]
},
{
"line_type": "record",
"order": 2,
"title": "title",
"field": "field",
"substring": "substring",
"title_settings" : {
"font": 12,
"alignment": "L",
"size_type": "content",
"percent_size": 12,
"text_type": ""
},
"field_settings": {
"font": 12,
"alignment": "L",
"size_type": "content",
"percent_size": 12,
"text_type": ""
},
"substring_settings": {
"font": 12
}
}
]
}
Fields
line type - it may have only two values: record or table,
order - required, order of the line,
data - required for tables, data for filling the table,
column size - optional for tables, size of columns in percent. The default value table will be equally divided according to column number.
title - required for records, each line consists of title and optional field. Title carries information about the field. For instance, “name”, “date” etc.
field - optional, some value which is described in title. If not defined line will be printed,
substring - optional, it is printed under the field line, usually used in templates

title_settings – required object for defining font and size of the title.
field_settings – object for defining font and size of the field. Same options as for title settings.

substring_settings – object for defining font and size of the substring.