Converts a Microsoft Word document (.DOCX or .DOC) file to a PDF document.
This service uses a LibreOffice headless server to perform the conversion, and may not support all features of the original document.
Known discrepancies
Variables
Variable replacement is supported with various methods:
{{name}}
{DOCVARIABLE "name"}
To enable variable replacement as Word variables for your account, please contact the FileForge support.
Conversion options. This field is required even if empty.
Options
templateLiterals
: Map of template literals to replace in the document. Template literals should be enclosed in double curly braces, e.g. {{name}}
. Variables name can contain alphanumeric characters and hyphens. All variables are case-sensitive. The value for each variable should be a string. If a value of undefined is passed, the variable will not be removed from the document. If you need to remove a variable, pass an empty string as the value.NB variables should not have surrounding spaces, e.g. {{ name }}
.
Example
In the Word document: {{name}} {{nickname}}. was born on {{date}}.
There will not be an error if a variable is not found in the document, nor if variables found in the document are not in the options.