changing the Header and Footer of PDF-Export

Description
bschorre
Posts: 25
Joined: Mon Aug 14, 2006 10:20 am
Location: Loehne, Germany

changing the Header and Footer of PDF-Export

Postby bschorre » Wed Feb 10, 2010 8:29 am

Hi,

is it possible to change the header and the footer of PDF export template?


Best regards
bschorre

bschorre
Posts: 25
Joined: Mon Aug 14, 2006 10:20 am
Location: Loehne, Germany

Re: changing the Header and Footer of PDF-Export

Postby bschorre » Wed Feb 10, 2010 11:44 am

Hi,

I found it:
.polarion/wiki/export.xml.

Within this file you can change the header and the footer of the PDF.


But how to write a footer like this?

Left Cell: Copyright ....
Center Cell: Date (dd.mm.yyyy)
Right Cell: Page 1 / 4


Best regards
bschorre

ChernikovaEkaterina
Posts: 15
Joined: Mon Dec 07, 2009 9:08 pm

Re: changing the Header and Footer of PDF-Export

Postby ChernikovaEkaterina » Thu Feb 11, 2010 4:17 pm

It is possible to modify header and footer at global context or at project level context
place in svn: .polarion/wiki/export.xml

If you define custom template code, you will probably need to set its suitable height: in element <header> it necessary to add 'height' attribute, e.g. <header height="48">. The same for footer.

Only XSL-FO is now allowed, you can use any terms from XSL-FO language, which are supported by FOP project from Apache organization
In the code, you can also use these variables:

* $cdoc.creatorId() -> user id, who create the page (admin)
* $cdoc.creatorName() -> user name, who create the page (System Administrator)
* $cdoc.creation() -> the date, when page was created (31.1.2009 1:21:00)
* $cdoc.projectId() -> project id, if wiki page belongs to one (keepass)
* $cdoc.projectName() -> project id, if wiki page belongs to one (KeePass Password Safe)
* $cdoc.updatedByName() -> user name, who last updated the page (System Administrator)
* $cdoc.updatedById() -> user id, who last updated the page (admin)
* $cdoc.updated() -> the date, when page was last updated (31.1.2009 16:00:43)
* $cdoc.documentName() -> the name of wiki page (test)
* $current_date -> today date in yyyy-mm-dd format (2009-01-31)
* $document_title -> the result is following text, depends on page location
o Project context:
o PROJECTNAME – PAGENAME (if page is in default space)
o PROJECTNAME – PAGENAME (if page is module page)
o PROJECTNAME – SPACENAME.PAGENAME (if page is in not in default space)
o Repository context :
o PAGENAME (if page is in default space) ** SPACENAME.PAGENAME (if page is not in default space)
* $document_revision -> revision number of wiki page (rev. 1)

Best Regards,
Ekaterina Chernikova
Polarion Software
Support Team

bschorre
Posts: 25
Joined: Mon Aug 14, 2006 10:20 am
Location: Loehne, Germany

Re: changing the Header and Footer of PDF-Export

Postby bschorre » Fri Feb 12, 2010 8:19 am

Hi,

OK, thanks.

But how can I get the max amount of pages?

Right Cell: Page 1 / 4


Best regards
Björn Schorre

bschorre
Posts: 25
Joined: Mon Aug 14, 2006 10:20 am
Location: Loehne, Germany

Re: changing the Header and Footer of PDF-Export

Postby bschorre » Tue Feb 16, 2010 1:58 pm

Hi,

I think this must be easy to Polarion Guys because in the standard config is it already implemented.


Best regards
Björn Schorre

ChernikovaEkaterina
Posts: 15
Joined: Mon Dec 07, 2009 9:08 pm

Re: changing the Header and Footer of PDF-Export

Postby ChernikovaEkaterina » Fri Feb 19, 2010 11:26 am

Dear Björn,

you can use e.g.:

<fo:table-cell text-align="right">

<fo:block text-align="right" font-size="7px" >

<fo:page-number/> /

<fo:page-number-citation ref-id="theEnd"/>

</fo:block>

</fo:table-cell>

Best Regards,
Ekaterina Chernikova
Polarion Software
Support Team

pitzalis
Posts: 15
Joined: Mon Jun 04, 2007 8:58 am
Location: Italy

Re: changing the Header and Footer of PDF-Export

Postby pitzalis » Thu Jun 02, 2011 7:04 pm

Hi,
how can I do the same with Polarion 2011 where the XSL-FO format isn't supported?
I see, in the default export.xml, the use of $[page] for the current page number, but there isn't examples for the total amount of pages.

With Polarion 2010 I was able to use custom variables in header/footer configuration. For example I set the use of $DocClassification in footer section of my export.xml file:

Code: Select all

     ....
     <fo:block font-weight="normal" text-align="center">
             $DocClassification
     </fo:block>
     ....

and than I set ${DocClassification} in my wiki page:

Code: Select all

#set($DocClassification = "UNCLASSIFIED")


How Polarion 2011 supports the use of custom variables?

Thanks,
Giuseppe

nobsi
Posts: 18
Joined: Wed Jan 12, 2011 9:22 am

Re: changing the Header and Footer of PDF-Export

Postby nobsi » Thu Jul 21, 2011 6:58 am

Hi,

the total amount of pages can now (2011 SR1) be used in the header/footer with $[total]

But I have the same problem that custom variables in header/footer cannot be used anymore. That is a big problem for us because we work with very formal processes and use the export very often to get the wiki reports/informations in our document-templates. I hope this feature will get back to Polarion in one of the next releases.

Regards
Richard

NickEntin
Posts: 472
Joined: Tue Oct 24, 2006 10:27 am
Location: Polarion Software GmbH, Stuttgart
Contact:

Re: changing the Header and Footer of PDF-Export

Postby NickEntin » Thu Jul 21, 2011 1:18 pm

Yes, it will

Best regards,
Nick

mathiaskrause
Posts: 35
Joined: Mon Apr 18, 2011 8:26 am

Re: changing the Header and Footer of PDF-Export

Postby mathiaskrause » Mon Aug 08, 2011 12:02 pm

Once ago, i created PDF export header and footer in ".polarion/wiki/export.xml".
Now, with update to Polarion 2011 SR1, the export does not do any header or footer anymore...

I created the header with with some images like this

Code: Select all

<custom type="fo">
<![CDATA[
<fo:block space-before="10px" space-before.conditionality="retain" space-after="0px">
<fo:table ...>
...


What am i doing wrong? Do i have to convert export.xml to a new format ?

NickEntin
Posts: 472
Joined: Tue Oct 24, 2006 10:27 am
Location: Polarion Software GmbH, Stuttgart
Contact:

Re: changing the Header and Footer of PDF-Export

Postby NickEntin » Tue Aug 09, 2011 11:36 am

Hi Mathias,

yes, you need. "Unfortunately" we switched to more flexible and robust library for PDF generation and changed configuration of the header/footer.
If you paste default configuration I believe you'll be able to easily adjust it to map your old configuration (it's not FO anymore, but HTML directly).

Best regards,
Nick

mathiaskrause
Posts: 35
Joined: Mon Apr 18, 2011 8:26 am

Re: changing the Header and Footer of PDF-Export

Postby mathiaskrause » Tue Aug 09, 2011 1:21 pm

Okay ... did that! Works fine. Thanks!

mathiaskrause
Posts: 35
Joined: Mon Apr 18, 2011 8:26 am

Re: changing the Header and Footer of PDF-Export

Postby mathiaskrause » Tue Aug 16, 2011 1:03 pm

NickEntin wrote:Yes, it will
Best regards,
Nick


Are custom variables back in the PDF export, in the meantime?

NickEntin
Posts: 472
Joined: Tue Oct 24, 2006 10:27 am
Location: Polarion Software GmbH, Stuttgart
Contact:

Re: changing the Header and Footer of PDF-Export

Postby NickEntin » Tue Aug 16, 2011 1:32 pm

Hi Mathias,

not yet, it's planned for one of the upcomming service releases, but not implemented yet.

Best regards,
Nick

mathiaskrause
Posts: 35
Joined: Mon Apr 18, 2011 8:26 am

Re: changing the Header and Footer of PDF-Export

Postby mathiaskrause » Tue Aug 16, 2011 2:25 pm

Okay, thanks for that information...


Return to “Polarion Application Lifecycle Management (ALM)”

Who is online

Users browsing this forum: No registered users and 8 guests