<pdf>

The <pdf> element provides the ability to customize the appearance of the output when rendering a QuickApp to a PDF. (Available as of prod-9)

Description

It is possible to specify options for output rendering at both the <render> level and the <widget> level. When specifying configuration options at the <render> level, specify attributes directly to the <pdf> element. To specify configuration options at the <widget> level, the attributes must be prefixed with pdf_.

Syntax

<dynamic>
  <render>
    <pdf [ATTR1_NAME]="[VALUE]"
          [ATTR2_NAME]="[VALUE]"
           ... />    
  </render>
</dynamic>

Alternate syntax

<dynamic>
    <widget class_="grid" 
            pdf_[ATTR1_NAME]="[VALUE]"
            pdf_[ATTR2_NAME]="[VALUE]"
            ... />
</dynamic>

Attributes

orientation_
Specifies the orientation of the resultant PDF.

Valid values are:

  • portrait
  • landscape

The default is portrait.

firstpageheader_
Controls whether a header is added to the first page. Accepts 1 or 0.

The default is 0.

fontembedding_
Specifies whether to embed all fonts or to not embed any fonts at all. Accepts all or none.

The default behavior is some font embedding, however standard fonts that PDF readers are expect to have are not embedded, yielding smaller file sizes. This attribute overrides the default behavior.

Valid values are:

all
Install all fonts, including standard fonts that PDF readers are expected to have. This will result in a larger file size.
none
Do not install any fonts. This will result in smaller files, but font substitutions on some platforms may occur.

Example: Specifying attributes at the <render> level

<dynamic>
  <render>
    <pdf orientation_="landscape"/>
  </render>
  <widget class_="button" type_="render" target_="pdf"/>
  <widget class_="grid" base_="pub.demo.retail.item"/>
</dynamic>

Example: Specifying attributes at the <widget> level

<dynamic>
  <widget class_="button" type_="render" target_="pdf"/>
  <widget class_="grid" base_="pub.demo.retail.item" 
   pdf_orientation_="landscape"/>
</dynamic>