Skip to main content

Prerequisites

  • A saved Risksheet document with no unsaved changes
  • The document must not be in comparison mode
  • Version 24.2.2 or later for color-preserved exports

Export the Risksheet to PDF

  1. Open your Risksheet document in Polarion.
  2. Save all changes — PDF export requires a clean, saved state.
  3. Select Export to PDF from the toolbar or context menu.
  4. A progress notification appears with “Exporting to PDF — Please wait while the file is being generated.”
  5. Risksheet loads the PDF export script (risksheetPdfExport.vm), generates the document, and triggers a file download.
PDF export is blocked if the sheet has unsaved changes or if comparison mode is active. You must save all changes and exit comparison view before the export option becomes available. Unlike Excel export, PDF export strictly requires a clean state.

Validation Requirements

PDF export enforces two checks before proceeding:
CheckConditionResult
Dirty stateSheet has unsaved changesExport blocked with error message
Comparison modeDocument is in revision comparison viewExport blocked; exit comparison first
The exported PDF reflects the current application state, including your active view configuration, visible columns, and top panel settings.

PDF Export Script System

PDF export behavior is controlled by a Velocity template file called risksheetPdfExport.vm. This template is loaded from one of two locations:
  1. Document attachment — a risksheetPdfExport.vm file attached directly to the LiveDoc
  2. Template inheritance — loaded from the parent template if no document-level file exists
The script receives a full Velocity context including document metadata, transaction access, and custom macros from pdfExportMacros.vm. It also has access to an exporter object with built-in methods: For detailed script customization, see Customize PDF Export Scripts.

Content Types in PDF Export

Main Sheet — The primary risk analysis grid exports with all visible columns, preserving cell colors (v24.2.2+), headers, and hierarchical row merging. You can selectively hide columns using the hideColumns parameter (comma-separated binding names). Rating Tables — Include rating scale definitions with three columns: ID, Label, and Description. Data comes from the ratings section of risksheet.json. Include multiple tables (severity, occurrence, detection, RPN) in a single export. Downstream Traceability Tables — Export linked downstream items (mitigation tasks, verification activities) with automatic deduplication based on controlColumn values. Enum Value Tables — Export custom enumeration definitions using exportEnumTable with enumId matching your enums configuration. Custom Tables — Build arbitrary tables via exportCustomTableData with custom column definitions (binding, header, width properties) and optional absolute positioning (xpos/ypos).

Cell Rendering in PDF

Column TypePDF Rendering
Text, numericDirect value display
BooleanText “true” or “false”
EnumComma-separated display names
Item linkLabel text from linked work item
Multi-item linkLabel from each linked item
Server-renderedStripped HTML converted to plain text
Empty cellsBlank by default, or custom text via emptyPlaceholder
Set the emptyPlaceholder property in your custom export script to display text like “N/A” or ”-” for null or empty cells instead of leaving them blank.

Enum Field Rendering

Enum fields in PDF export may behave inconsistently: regular enums export with display titles (e.g., “High”), but rating enums (numeric IDs) and user/assignee fields may show internal IDs instead of display names. Use saved views for more consistent formatting control.

Comparison Mode Export

The PDF export system supports comparison mode with these scope variables available to custom scripts:
  • isInCompare — whether the export is in comparison mode
  • compareRevision — the revision being compared against
  • currentRevision — the current document revision
  • showUnchanged — whether to include unchanged items

Performance Tips

Cell merging is the primary bottleneck for PDF exports. Switching to Flat table view can reduce export time from hours to minutes. The masterMergeOnly property controls hierarchical versus flat export structure. Version 25.2.0 includes optimizations for merged cell processing.
  • Set refreshOnSave to false to avoid full page reloads that impact the export workflow
  • Set moduleOnlyPermissions to true for faster loading on large sheets (v24.8.5+)

Known Limitations

  • Text truncation — PDF export may truncate text in cells for linked elements when content exceeds the calculated cell height. A fix is tracked with high priority.
  • Multi-page row repetition — When risk items span multiple pages, text from the previous page repeats at the top of the next page for context continuity. This is by design but can confuse reviewers.
  • Baseline display — Baseline references in PDF exports may show incorrect or missing entries in variant projects. Use document ID/path-based baseline identification for reliability.
  • Images not exported — Embedded images in work item fields do not appear in PDF exports.

Verification

You should now see a downloaded PDF file in your browser’s download folder. Open it and confirm that:
  • The main risk analysis grid appears with correct column layout
  • Cell colors and formatting match the Risksheet view (v24.2.2+)
  • Rating tables display severity/occurrence/detection definitions
  • Downstream traceability tables show the expected linked items

See Also

Support TicketsSource Code
  • PdfExportConfigurationService.java
  • ExportToPdfCommand.ts
  • CommandFactory.ts
  • ExportToPdf.ts
  • RisksheetViewServlet.java