PDF API
Availability
Previously, PDF files could be produced from the Form Runner user interface, or by sending or emailing a PDF, but not from the Form Runner API. This is now possible with the PDF API.
Path and parameters
You access the PDF API as follows:
/fr/service/$app/$form/export/$document?form-version=$form-version&export-format=$export-formatWhere:
$appis the form definition's application name$formis the form definition's form name$documentis the form data's document id$form-versionis the form definition version number (latest published version by default)$export-formatis eitherpdfortiff
Other parameters
The following parameters allow controlling hints, alerts, and required controls in the PDF:
fr-pdf-show-hintsdefaults to the
oxf.fr.detail.static-readonly-hintproperty, which itself defaults tofalsewhen
true, shows hints in the PDF
fr-pdf-show-alertsdefaults to the
oxf.fr.detail.static-readonly-alertproperty, which itself defaults tofalsewhen
true, shows alerts in the PDF
fr-pdf-show-requireddefaults to the
oxf.fr.detail.static-readonly-requiredproperty, which itself defaults tofalsewhen
true, style required controls in the PDF
The following parameters allow controlling the use of PDF templates:
fr-use-pdf-templateThis defaults to
trueif there is at least one PDF template attached to the form,falseotherwise.If at least one PDF template is available, the default is to use one of the PDF templates. But if
use-pdf-template = "false", then use of any PDF template is disabled and the automatic PDF is produced.
fr-pdf-template-nameThis contributes to selecting a specific PDF template.
If
pdf-template-namespecifies a name, such as withpdf-template-name = "archive", the list of available PDF templates is reduced to those having an exactly matching name. If no matching name is found, an error is raised.
fr-pdf-template-langThis contributes to selecting a specific PDF template.
If
pdf-template-langspecifies a language, such as withpdf-template-lang = "fr", the list of available PDF templates as reduced bypdf-template-nameis used to find a PDF template with a matching language. If no matching language is found, an error is raised.If
pdf-template-langis empty or missing:The PDF template with the current form language is used, if there is a match.
If there is no match, the first available PDF template is used.
Last updated