Skip to main content
diagram

Prerequisites

PDF export requires the sheet to be in a clean state. The export command validates two conditions before proceeding:
Always save your changes before exporting to PDF. The export reads the last saved revision of the document to ensure the PDF reflects a consistent, committed state.

Server Endpoint

The server loads the risksheetPdfExport.vm Velocity template, renders it with the full Velocity context (including document, transaction, and pdfExportMacros.vm helper macros), and returns the generated JavaScript code to the browser for execution.

PDF Export Configuration Properties

Template Properties

Export Command Properties

Export Functions

The export script has access to the following functions through the exporter object. Each function renders a specific type of table in the PDF output.

exportMainSheet

Exports the primary Risksheet grid to PDF.
Use hideColumns to exclude internal or administrative columns that are useful in the interactive grid but not needed in printed output. The columns are hidden temporarily during PDF rendering and restored immediately after.

exportSubTable

Exports a filtered sub-table containing only rows where a specified control column has non-empty values.
Typical use cases include exporting separate tables for mitigation tasks, verification activities, or other task-level data that you want to present independently from the main risk table.

exportDownstreamTable

Exports downstream traceability tables with deduplication. Unlike exportSubTable, this function tracks which control column values have already been processed and skips duplicate rows, producing a table of unique downstream relationships.

exportRatingTable

Exports a risk rating definition table with three columns: ID, Label, and Description. Rating data is read from the Polarion enumeration referenced by the rating:<enumId> column, not from any section of the sheet configuration.
The output table always has three columns:

exportEnumTable

Exports an enumeration value table showing ID, Label, and Description for a Polarion enumeration referenced by an enum:<enumId> or multiEnum:<enumId> column.

exportCustomTableData

Exports arbitrary tabular data with custom column definitions and optional absolute positioning.

Script Context Variables

The generated export script has access to the following scope variables:
The export command passes the current application state (app.state) to the PDF renderer. This means the exported PDF reflects the current view configuration, including top panel settings and active filters.

Cell Formatting in PDF

The export engine automatically handles cell formatting for different column types:
Based on reported issues, be aware of the following PDF export behaviors:
  • Enum fields: Regular enums export with display titles, but rating fields (numeric IDs) and user reference fields may export with internal IDs instead of display names. Use saved views as an alternative export mechanism for consistent formatting.
  • Risk matrix calculations: Risk matrix totals in PDF export may not correctly count risks across all severity categories in some configurations. Verify risk matrix counts against the interactive grid.
  • Long text overflow: Tables may not automatically expand to accommodate long text content. Test your PDF export with representative data to verify layout.
  • Baselines: PDF export baseline display may show incorrect or missing baselines in variant projects. Baselines should be identified by document ID/path for reliability.

Template Inheritance for PDF Export

The risksheetPdfExport.vm template follows the same inheritance chain as the main sheet configuration:
  1. Document attachment (highest priority) --- Template file attached directly to the LiveDoc document
  2. Template document --- Inherited from the document’s Polarion template
  3. Global template --- Project-level default template configuration
To create a document-specific PDF export template, use Menu > Override Template to detach from the inherited configuration, then attach a custom risksheetPdfExport.vm file to the document.

Complete Example

A typical risksheetPdfExport.vm export script that produces a complete FMEA report:

Progress Feedback

During PDF generation, Risksheet displays a persistent toast notification: The notification remains visible until the PDF file is generated and the download begins.
Last modified on July 10, 2026