dynamic document name

Posts: 3
Joined: Tue Jun 24, 2014 6:35 am

dynamic document name

Postby dani » Tue Jul 01, 2014 7:12 am


In a generated document I would like to have the following:

1) When exporting the document to a pdf (or exported as word for round trip would be great too) the name should consist of revision number and date of last update i.e.: RS_4316_2014-07-01.pdf . Is this possible and if so how?

2) I would like to have this dynamically generated name mentioned in point 1 written in the documents header. I tried with something like the following but it didn't work, I couldn't get rid of the time:

Code: Select all


Many thanks in advance

Posts: 19
Joined: Wed Jan 19, 2011 8:40 am

Re: dynamic document name

Postby Sandro_F » Thu Jul 10, 2014 7:22 am

Well, you can create a custom plugin which creates the PDF document. The disadvantage of this approach is that you need also a custom link to trigger the custom plugin export - native Polarion PDF export uses a "own" internally URL to create the PDF.

If you want to trigger you custom plugin over native Polarion export function you need to create some rules in Apache URL "RewriteEngine":

In your Apache config file you need something like this:

Code: Select all

  RewriteEngine On     
  RewriteCond %{QUERY_STRING} ^projectId=([^&]*)&moduleLocation=([^/]+)%2F([^/&]+)[&revision=]*([\d]*).*&pdf=true
  RewriteRule ^.*/document\.html$ /polarion/customPlugin?projectId=%1&headerFooter=true&bookmarks=true&orientation=portrait&paper=A4&exportType=PDF&adjustWidth=false&moduleName=%3&myRevision=%4&location=%2 [L,R]


Return to “Polarion Application Lifecycle Management (ALM)”

Who is online

Users browsing this forum: Google [Bot] and 9 guests