Orbeon Forms
Search…
PDF

Custom PDF filename

[SINCE Orbeon Forms 4.9]
The following property dynamically controls the name of the PDF file produced on the Detail Page. By default, if the property value is blank, the PDF filename is a random id assigned to the current form session.
1
<property
2
as="xs:string"
3
name="oxf.fr.detail.pdf.filename.*.*"
4
value=""/>
Copied!
The value of the property, if not empty, is an XPath expression which runs in the context of the root element of the XML document containing form data. The trimmed string value of the result of the expression is used to determine the filename.
Example:
1
<property
2
as="xs:string"
3
name="oxf.fr.detail.pdf.filename.*.*"
4
value="//customer-id"/>
Copied!
If the form contains a customer-id field, the PDF filename will be the value of that field followed by .pdf. If the field is blank, the default, random id filename is used, as if the property had not been specified.

Hyperlinks in automatic mode

[SINCE Orbeon Forms 4.6]
The following property controls whether hyperlinks are enabled in the generated PDF. By default, they are enabled:
1
<property
2
as="xs:boolean"
3
name="oxf.fr.detail.pdf.hyperlinks.*.*"
4
value="true"/>
Copied!
When set to true:
  • HTTP and HTTPS URLs in input field and text areas are automatically hyperlinked.
  • Hyperlinks in rich text controls are preserved.
  • Hyperlinks in the rest of the form, if any, are preserved.
When set to false:
  • HTTP and HTTPS URLs in input field and text areas are not hyperlinked, but placeholders are added.
  • Hyperlinks in rich text controls are removed and placeholders are left.
  • Hyperlinks in the rest of the form, if any, are removed and placeholders are left.
  • Placeholders consist of an HTML <a> without an href attribute. This helps with CSS styling.
For example, the default style for hyperlinks only highlights and underlines <a> elements with an href attribute:
1
a[href] {
2
text-decoration: underline;
3
&:link, &:visited {
4
color: @linkColor !important;
5
}
6
}
Copied!

Avoiding fields being cut across pages

[SINCE Orbeon Forms 2020.1.5] When a field can be partially, but not entirely, shown at the bottom of a page, instead of showing part of the field on one page and part on the other page ("cutting" the field), it is often better to move that field along with its label to the next page. However, in some cases, when the field contains a lot of text, moving the whole field to the next page means that the "previous page" ends up with a lot of blank space, which is a suboptimal use of the page, and can even be confusing.
So Orbeon Forms implements the following heuristic in cases where the whole field can't fit on the current page: if the field's content is "short", the whole field is pushed to the next page, and if the content is "longer" the field is "cut", with part of the field on one page, and part on the next page. The threshold separating what is considered to be "short" and "longer" is defined with the following property, in the number of characters, and the default value is 512.
1
<property
2
as="xs:integer"
3
name="oxf.fr.detail.pdf.long-content-threshold.*.*"
4
value="512"/>
Copied!

Barcode

[Orbeon Forms PE] The following property specifies whether a barcode must be included on PDF files produced from a PDF template. Adding a barcode to a PDF produced without a PDF template isn't supported at this point (see RFE #2190).
1
<property
2
as="xs:boolean"
3
name="oxf.fr.detail.pdf.barcode.*.*"
4
value="false"/>
Copied!

Font embedding in automatic mode

Font embedding in template mode

Disabling the PDF button when form is invalid

[BEFORE Orbeon Forms 4.2]
With version 4.0 and earlier, the PDF button is always disabled if invalid data is present in the form.
[SINCE Orbeon Forms 4.2]
The PDF button is always enabled, allowing users to generate a PDF for the current form, even if some data in the form is invalid. If instead, you wish to disable the PDF button when the form is invalid, set the following property to true (it is set to false by default):
1
<property
2
as="xs:boolean"
3
name="oxf.fr.detail.pdf.disable-if-invalid.*.*"
4
value="false"/>
Copied!

Automatic PDF page size and orientation

[SINCE Orbeon Forms 2019.2]
Available page orientations:
  • portrait (default)
  • landscape
1
<property
2
as="xs:string"
3
name="oxf.fr.detail.rendered-page-orientation.*.*"
4
value="portrait"/>
Copied!
Available page sizes:
  • letter (default)
  • a4
  • legal
1
<property
2
as="xs:string"
3
name="oxf.fr.detail.rendered-page-size.*.*"
4
value="letter"/>
Copied!
These can also be configured for a particular form in Form Builder's Form Settings dialog.

Calculations in readonly modes

[SINCE Orbeon Forms 2021.1]

See also

Last modified 18d ago