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: “Exporting to PDF — Please wait while the file is being generated.”
  5. Risksheet loads the PDF export configuration (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. Save all changes and exit comparison view before exporting. Unlike Excel export, PDF export strictly requires a clean state.

Validation Requirements

PDF export enforces two checks before proceeding: The exported PDF reflects the current state, including your active saved view, visible columns, and top panel settings.

PDF Export Configuration

PDF export behavior is controlled by a Velocity template called risksheetPdfExport.vm — the PDF export configuration. 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 template receives a full Velocity context (document metadata, transaction access, macros from pdfExportMacros.vm) plus an exporter object with built-in methods for the main sheet, rating tables, enum tables, downstream tables, and custom tables. For details, see Customize PDF Export Scripts.

Content Types in PDF Export

Main sheet — The primary grid exports with all visible columns, preserving cell colors (v24.2.2+), headers, and hierarchical row merging. Hide columns via the hideColumns parameter (comma-separated bindings names). Rating tables — Three-column tables (ID, Label, Description) describing rating scales, emitted via the #exportRatingTable("<enumId>") macro (exporter.exportRatingTable("<enumId>") in script form). Values come from the Polarion enumeration referenced by each rating column (type: rating:<enumId>), not from any sheet-configuration section. Multiple tables (severity, occurrence, detection, RPN) can be emitted in one export. Downstream traceability tables — Export linked downstream items (mitigation tasks, verification activities) with deduplication based on controlColumn values. Enum value tables — Export Polarion enumeration definitions via the #exportEnumTable("<enumId>") macro (exporter.exportEnumTable("<enumId>") in script form), with enumId matching the enumeration referenced by an enum:<enumId> or multiEnum:<enumId> column type. Values come from the Polarion enumeration (Administration > Enumerations), not from any sheet-configuration section. Custom tables — Build arbitrary tables via exportCustomTableData with custom column definitions (bindings, header, width) and optional absolute positioning (xpos/ypos).

Cell Rendering in PDF

Set emptyPlaceholder in your custom export template to display text like “N/A” or ”-” instead of leaving null cells blank.
Regular enums export with display titles (e.g., “High”), but rating enums (numeric IDs) and user/assignee fields may show internal IDs instead of names. Use saved views for more consistent formatting.

Comparison Mode Export

When exporting in comparison mode, custom templates have access to these scope variables:
  • 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

Multi-Language Font Support

PDF export detects Latin characters by default. For non-Latin scripts, enable the appropriate font areas via the Polarion server property risksheet.pdf.additionalFonts: Supported areas: latin chinese korean japanese hebrew thai arabic. Values can be separated by spaces, commas, or semicolons. Latin is always enabled and covers the math symbol fallback. Unsupported values are ignored and logged to the browser console.

Performance Tips

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

Known Limitations

  • Text truncation — Cells for linked elements may truncate when content exceeds the calculated cell height. A fix is tracked.
  • 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 (by design).
  • Baseline display — Baseline references may show incorrect or missing entries in variant projects. Use document ID/path-based identification.
  • Images not exported — Embedded images in work item fields do not appear in PDF exports.

Verification

You should now see a downloaded PDF in your browser’s download folder. Open it and confirm:
  • 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

Last modified on July 10, 2026