Best Practices (5/6): Export to PDF

You can export to PDF in three ways:

  1. Keeping the online layout in WYSIWYG export
    recommended for One Pagers without huge tables
    • The layout is kept
    • Components can be excluded via the Visible Components property
    • Headers and footers can be freely defined
  2. Using a Section Template (see section 3.2 of the User Manual)
    recommended for dashboards with huge tables or special export layout requirement
    • Rearrange components for the export
    • Use HTML layouting to create enhanced layouts
    • Headers and footers can be freely defined
    • Create individual sections in the PDF document
  3. Using a Word or PowerPoint Template (see section 3.2 of the User Manual)
    recommended for Booklet Exports and sophisticated requirements
    • Define a special Word or PowerPoint template with title page, TOC, chapter headings and texts
    • Each component is explicitly included via its own placeholder
    • Placeholders can be freely arranged – placeholders can be placed in headers, footers, table cells etc.
    • This specific template is uploaded to the server and referenced via property “Template Filename”

Examples for export templates are contained in the Documentation package on the website. Instructions for PDF export settings can be found below:

Creating a WYSIWYG Export

The WYSIWYG Export keeps the layout of the application, as it is shown on the users’ screens when they start the export.
The following property values are recommended in this scenario. The definition of header and footer HTML is not needed, if your application has been designed following the concepts in “General application design”. In this case, the header of the application (containing logo, title, filters, user information etc) is reused. The footer of the application is reused as the footer of the PDF document.

10 Sets the page borders of the PDF document. As the header and footer of the application is reused, we do not have to reserve any space for a PDF header or footer.
FOOTER HML The footer of the application is reused.
HEADER HML The header of the application is reused.
VISIBLE COMPONENTS PANEL_EXPORT_EXCLUDE_xxx Specifies those components, which shall not be shown in the export. As we collected all components, which shall be hidden in the PDF document, in the PANEL_EXPORT_EXCLUDE panel, we only have to name this component.
Make sure „Excluded“ is always set to „true“.

Using a Section Template

Long or wide tables are usually shown with a scroll bar in the online application. This scrollbar should be deleted in the PDF document, and instead the complete table should be exported. As with the WYSIWYG Export scroll bars and layouts remain unchanged, you have to define a Section Template in this case.

50,50,20,20 The default values can be kept. In the contrast to the WYSIWYG Export, the headers and footers shall be repeated on each page. This is why some space has to be reserved on top and bottom of the page.
PAGE SECTION TEMPLATE Each row in the Page Section Array creates a new section in the PDF document. A section always starts on a blank page.
- FOOTER HML Page %PAGE% of %PAGES% pages Defines the footer of the section. This definition results in e.g. “Page 1 of 3 pages”.
- HEADER HML %PANEL_HEADER% Defines the header of the section. As we defined the header of the application in the panel PANEL_HEADER, we can simply reuse and place this panel in the PDF header.
- CONTENT %CROSSTAB_1%:TEXT Table CROSSTAB_1 of the application is exported on multiple pages. The header is automatically repeated on each page.
Wide tables can be split automatically via the %CROSSTAB_1%:TEXT[auto] notation.

Of course, you can also maintain multiple page sections if you want to export different components on different pages. Headers and footers can be defined explicitly for each section.
Using HTML notation, e.g. tables and formatting tags, you can also create enhanced layouts.

Using a Word or PowerPoint Template

To generate highest quality PDF documents very fast and efficiently, you can simply use a Word or PowerPoint document as an Export Template. For instructions on how to create such a template, please refer to “Export to Word” and “Export to PowerPoint” respectively.
Upload the template to the server and write the name of the file into the “Template Filename” property of PDF group.
As a consequence, in fact a Word or PowerPoint export is being performed. The generated document is then not saved as an Microsoft Office document, but directly into PDF format.

This was number 2 in our series of Best Practices Blog Posts, which shall give you several hints how to design you Design Studio application in order to enable export in the best and most efficient way to PowerPoint, Word, PDF and Excel. We describe the export of the current view (referred to as “Online Export”), as well as the automatic export of different views of the application (referred to as “Booklet Export”).

We have started with general export concepts that you should keep in mind when designing an application.
We will finish the series with a “Tips & Tricks” section, which informs you about the most important configuration parameters and how to perform updates.
Check out also the other blog posts about exporting to other document formats!

Thilo Knötzele
Author: Thilo Knötzele
Creation date: 18.08.2017
Category: Best Practice
back to overview