PDF Export Customizer Scripts

With Dataplane Customizer Scripts, you can also customize the size, orientation, layout and other attributes of your exported PDFs on a report-by-report basis.

If you are not yet familiar with using Customizer Scripts in your reports, first see the Customizing Reports with Scripts section for background information.

The following general Customizer Script syntax is used to modify the properties of PDF exports:

customizeExport {
	format "pdf" [properties...]
}

The format "pdf" indicates that you are customizing the PDF export format, and it is followed by one or more pairs of properties and values.

For example, to create a wide-format landscape page for a multi-column Issues Work Log Table Report, you could use the following:

customizeExport {
	format "pdf" size "ledger" orientation "landscape" backgroundImage "ourLogo.png"
}

You can also place your PDF export customizations on separate lines (still starting with format "pdf"), such as the following:

customizeExport {
	format "pdf" size "ledger"
    format "pdf" orientation "landscape"
    format "pdf" backgroundImage "ourLogo.png"
}

 

The following properties and values can be used to customize PDF exports:

PropertyValuesDescription
size

"letter"
"legal"
"ledger"
"A3"
"A4"
"A5"
"B4"
"B5"

Specifies the output page size for the PDF file.

orientation

"portrait"
"landscape"

Selects whether the longest edge of the page is on the vertical ("portrait") or horizontal ("landscape").
backgroundImage

"<filename>"

To add a logo or letterhead to your report, you may specify an image file (of format .png or .jpg) to use as a background for the exported report.

This file must be placed in the following directory on your Jira server by your Jira administrator:

<JIRA_DATA>/dataplane/export/<filename> 

(where <JIRA_DATA> is the path to your Jira data directory)

Only a simple filename may be used. Any paths are ignored. For details on the required format of the background image, see PDF Export Letterhead.

stylesheet

stylesheets

"<filename>"

("<filename1>", "<filename2>", ...) 

To provide a custom styling for the text, layout, header or footer for the exported report, you may specify one or CSS cascading stylesheets.

The stylesheet must be placed in the following directory on your Jira server:

<JIRA_DATA>/dataplane/export/<filename>

(where <JIRA_DATA> is the path to your Jira data directory)

Only simple filenames may be used. Any paths will be ignored.

To add a single stylesheet, simply enclose the filename in quotation marks. To add multiple stylesheets, you must still enclose the filename in quotation marks, and the comma-separated list of stylesheets must be enclosed within parenthesis. Any "stylesheet" keyword will automatically replace all previously-listed stylesheets.

For example:

// Add one styleesheet
stylesheet "sheet1.css"
 
// Add multiple stylesheets
stylesheets ("sheet1.css", "sheet2.css")

For more information on the rules you can use in the stylesheets, see PDF Export CSS Stylesheet Guidelines.

Page Contents

Copyright © 2017 Arsenale Systems, Inc. · All rights reserved · Contact Us · Powered by Atlassian Confluence