Page 1 of 1

changing the Header and Footer of PDF-Export

Posted: Wed Feb 10, 2010 8:29 am
by bschorre
Hi,

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


Best regards
bschorre

Re: changing the Header and Footer of PDF-Export

Posted: Wed Feb 10, 2010 11:44 am
by bschorre
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

Re: changing the Header and Footer of PDF-Export

Posted: Thu Feb 11, 2010 4:17 pm
by ChernikovaEkaterina
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

Re: changing the Header and Footer of PDF-Export

Posted: Fri Feb 12, 2010 8:19 am
by bschorre
Hi,

OK, thanks.

But how can I get the max amount of pages?

Right Cell: Page 1 / 4


Best regards
Björn Schorre

Re: changing the Header and Footer of PDF-Export

Posted: Tue Feb 16, 2010 1:58 pm
by bschorre
Hi,

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


Best regards
Björn Schorre

Re: changing the Header and Footer of PDF-Export

Posted: Fri Feb 19, 2010 11:26 am
by ChernikovaEkaterina
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

Re: changing the Header and Footer of PDF-Export

Posted: Thu Jun 02, 2011 7:04 pm
by pitzalis
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

Re: changing the Header and Footer of PDF-Export

Posted: Thu Jul 21, 2011 6:58 am
by nobsi
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

Re: changing the Header and Footer of PDF-Export

Posted: Thu Jul 21, 2011 1:18 pm
by NickEntin
Yes, it will

Best regards,
Nick

Re: changing the Header and Footer of PDF-Export

Posted: Mon Aug 08, 2011 12:02 pm
by mathiaskrause
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 ?

Re: changing the Header and Footer of PDF-Export

Posted: Tue Aug 09, 2011 11:36 am
by NickEntin
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

Re: changing the Header and Footer of PDF-Export

Posted: Tue Aug 09, 2011 1:21 pm
by mathiaskrause
Okay ... did that! Works fine. Thanks!

Re: changing the Header and Footer of PDF-Export

Posted: Tue Aug 16, 2011 1:03 pm
by mathiaskrause
NickEntin wrote:Yes, it will
Best regards,
Nick


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

Re: changing the Header and Footer of PDF-Export

Posted: Tue Aug 16, 2011 1:32 pm
by NickEntin
Hi Mathias,

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

Best regards,
Nick

Re: changing the Header and Footer of PDF-Export

Posted: Tue Aug 16, 2011 2:25 pm
by mathiaskrause
Okay, thanks for that information...