Documentor Render a Word template
Parameters
Section titled “Parameters”| Label | Type | Required | Description |
|---|---|---|---|
| Template URL | string | yes | Publicly accessible URL of the base Word document (.docx) to use. |
| Fragments | array_json | no | Ordered list of public .docx URLs to document fragments to replace the {{DocumentorFragments}} placeholder with. Items can either be a URL or an object with |
| Values | JSON | no | JSON key-value mapping of the variable names and the values to replace them with. |
| Pictures | list | no | List of the placeholder names and the pictures to replace them with. |
| Output format | choice | yes | Format of the resulting document. Choices:
|
| Remove metadata | boolean | no | Whether to remove metadata, such as title and author name, from the resulting PDF document. |
Placeholder values
Section titled “Placeholder values”The values field is an object mapping the placeholder names to the values to replace them with. Each value can either be:
- a string or number
- an array, which will be converted to a list
- an object, whose keys will be converted to level 3 headings with the values printed below
Pictures
Section titled “Pictures”The pictures field is an object mapping the placeholder names to the URLs to the images to replace them with.
Output
Section titled “Output”The following JSON is returned.
{ "ok": true, "outputURL": "https://connector-backend.smartyellow.net/artefacts/8f7f69af-a809-423d-bfae-2f2b78a5ec6c.png", "warnings": []}-
outputURLcontains the URL to the generated document. Read more on these URLs here. -
warningsmay contain warnings about pictures you provided:-
The format “$format” of the picture for “$placeholder” is unknown. Allowed are:
jpg,png,gif,bmp. -
Your provided dimensions for the “$placeholder” image result in an aspect ratio of 1:2.65, which does not match its intrinsic ratio of 1:3. This may result in a stretched image. You can resolve this by only setting a width or height instead of both.
-