create word/pdf template - by defining each line of the document you can create a
word/pdf
document.
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.
- size_type – text of title is inside cell of the table, so
the
size
can be different from the length of the text. By default it’s equal, but it can be changed. It have
3
options:
content which is default value, endLine and percent.
- endLine – extends the cell of the title until the end
of the
line.
- percent – width of the paper is considered as 100%
(excluding
the
margins). Needs an optional field value by
which the size of the cell will be calculated.
- font – by default 12.
- percent_size – size of title cell in percent. Required
when
the
size_type is percent.
- alignment – alignment of the text, by default L (left) it
can
be
left, right or center. Value options: L,R,C
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.
- font – by default 8.
- alignment - alignment of the text, by default L (left) it
can
be
left, right or center. Value options: L,R,C