This documentation relates to the latest version of Confluence.
If you are using an earlier version, please go to the documentation home page and select the relevant version.

Customise Adobe PDF Exports

All Versions

Confluence 3.0 Documentation
The PDF customisation procedures described on this page are only applicable to Confluence 2.10.3 and earlier versions
To customise PDF exports in Confluence 3.0, please use the procedure described in Editing the PDF Stylesheet.

Confluence pages can be output to PDF and some resulting PDF content can be modified. While page content itself is not open to customisation without major source-code modifications, this guide covers the easier task of modifying the plain text contained in page titles, headers and footers and page size.

Change in Confluence 2.6.0
The Velocity template files (files whose names end in .vm) were moved inside the main confluence-<version>.jar file with the release of Confluence 2.6.0 (i.e. $CONFLUENCE_INSTALL/confluence/WEB-INF/lib/confluence-2.6.jar in version 2.6). If you are unfamiliar with editing the contents of a .jar file, you may find these instructions useful.
Alternatively Java Servlet Technology allows you to use an unpacked version of the desired file in the WEB_INF/classes directory. Make sure you reproduce the exact directory (package) structure.

Change PDF page size

Landscape orientation

Editing PDF content

Modify Page Title

Modify Page Headers for Space Export

Modify Page Footers for Space Export

Exporter Velocity Context Additions

Export PDF in another Language

Labels

customize customize Delete
landscape landscape Delete
size size Delete
orientation orientation Delete
pdf pdf Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Feb 15, 2007

    Jay says:

    I am trying to take pdf export of confluence pages. Thus created pdf has au...

    I am trying to take pdf export of confluence pages. Thus created pdf has autogenerated header (like 'This page last changed.....') and footer (like 'Document generated by Confluence on....' and page no.)

    Is it possible to turn this auto generated header/footer without having to going into velocity template changes?

    1. Feb 21, 2007

      Kevin Tran says:

      Hi Jay, Unfortunately at present, the only way to change the header/footer in P...

      Hi Jay,

      Unfortunately at present, the only way to change the header/footer in PDF exports is to modify the velocity templates. There is an existing request for this feature in JIRA.

      http://jira.atlassian.com/browse/CONF-2079

      Please add yourself as a watcher so that you can keep up to date. Additionally, you can also vote for the issue's popularity.

      Regards,
      Kevin

  2. Feb 22, 2007

    Olivier Dagenais says:

    Hi, I updated and debugged my FO with Apache's FOP but when I piece it back tog...

    Hi,

    I updated and debugged my FO with Apache's FOP but when I piece it back together in the velocity templates, a Confluence PDF export doesn't produce the same results.

    A search through the Confluence folder for JAR files yielded this:

    confluence/confluence/WEB-INF/lib/fop-0.20.5-atlassian-20060626.jar

    ...and it appears I was working against version 0.93 of FOP.

    Do I interpret this correctly? That Confluence is using an Atlassian-modified version of the previous release of FOP??

    Any chance I can upgrade it myself (i.e. is the API still compatible?) or should I log a JIRA case against modernizing the FOP version in Confluence?

  3. Mar 06, 2007

    Ivan Benko says:

    Hi Olivier, Yes we are indeed using the 0.20.5-atlassian-20060626 in Confluence...

    Hi Olivier,

    Yes we are indeed using the 0.20.5-atlassian-20060626 in Confluence 2.3.3 onwards. Unfortunately, the version you are using 0.93 has a fairly different API and is not compatible with 0.20.5. You should be able to use 0.20 release without change but we already have the latest. In other words, you can't just simply drop the newest jar into the web-inf/lib directory.

    FYI - we are in a process of trying to upgrade the FOP package again, as there seems to be some bugs in this version.

    Please create a support case in http:/support.atlassian.com if you require further help.

    Thanks,
    Ivan

    1. Mar 06, 2007

      Olivier Dagenais says:

      Good to know, thanks! Any ETA on this upgrade? Or perhaps a JIRA issue number ...

      Good to know, thanks!

      Any ETA on this upgrade? Or perhaps a JIRA issue number I can subscribe to??

      Thanks, Ivan!

      1. Mar 07, 2007

        Ivan Benko says:

        Yes Olivier, we do have a related bug opened in JIRA already. Please follow the ...

        Yes Olivier, we do have a related bug opened in JIRA already. Please follow the progress there.

        In particular, the comment from Charles, is specifically aiming on the update of the FOP library.

        We think we've got a solution for this, but it involves upgrading to an unreleased development version of one of our dependent libraries. So fixing the problem is going to require a lot of very careful testing for regressions elsewhere.

        Let me know if you need additional information.
        Thanks,
        Ib

  4. Jun 27, 2007

    Eric Bardoux says:

    Hi, Where is the css file used to render PDF? Because i've modified the site-cs...

    Hi,

    Where is the css file used to render PDF? Because i've modified the site-css.vm to modify the wiki content, but when i export to PDF, i still have the default styles.

    Regards

     Eric

    1. Jun 27, 2007

      Tony Cheah Tong Nyee says:

      Hi Eric, I have raised a support ticket for you in our Atlassian Support system...

      Hi Eric,

      I have raised a support ticket for you in our Atlassian Support system. Please follow the update there.

      Cheers,
      Tony

  5. Jul 21, 2007

    hernan g says:

    Modify page title for single page export But what about when we use space expor...

    Modify page title for single page export

    But what about when we use space export? I modified it to not print the "This page last changed on Jul 02, 2007 by admin." but when I use the space export for the same one page, I get that line again... where is that controlled?

    1. Jul 21, 2007

      hernan g says:

      ok so I found it (why isn't it documented?) it is in Space.pdfexport.vm in confl...

      ok so I found it (why isn't it documented?) it is in Space.pdfexport.vm in confluence\spaces

      I also changed but not sure who uses it: Page-Hierarchy.pdfexport.vm in confluence\pages (also had the same text)

      and after all of this.. I have a bigger problem:
      While footer actually do appear in EVERY page like it says here, the common_header_fop.vm only appears on the FIRST page when I exported (space, multiple pages). What kind of a header is that?

      Also, I tried using an image in the header, but it is not clear what path to use. if I use relative, then relative to what?

    2. Aug 31, 2007

      Anonymous says:

      I'd also like to know whether it is possible to use relative paths for images. C...

      I'd also like to know whether it is possible to use relative paths for images. Can anyone tell us?

      Thanks,

      Martin

      1. Sep 02, 2007

        Fennie Ng says:

        Hi Martin, As I know only absolute paths for images are supported at the moment...

        Hi Martin,

        As I know only absolute paths for images are supported at the moment. If you are keen on using relative paths, feel free to raise a request for this issue. Thank you.

        Regards,
        Fennie

  6. Sep 06, 2007

    Anonymous says:

    Hi, How could it be possible to have multiple PDF templates for export ? I mea...

    Hi,

    How could it be possible to have multiple PDF templates for export ?

    I mean, one global template for space or pages export, and a specific one for some special pages ?

    Could it be done by modifying velocity templates ? Or using user defined macros ?

    Thanks for your ideas. 

    1. Sep 07, 2007

      Tony Cheah Tong Nyee says:

      Hi there, Unfortunately, this is not supported in Confluence. However, you may ...

      Hi there,

      Unfortunately, this is not supported in Confluence. However, you may be interested to look at the following open feature request regarding having the ability to specify a template to use other than the default instead, when generating a PDF:

      Feel free to cast your vote to increase its popularity and add yourself as a watcher for future updates. Additionally, you may also add your comments to the issue to share some idea of yours.

      Cheers,
      Tony

  7. Oct 19, 2007

    Anonymous says:

    How to export pages along with the child pages from the pdf export link provided...

    How to export pages along with the child pages from the pdf export link provided in each page as the admin can do from space admin?

  8. Oct 19, 2007

    Imtiaz B Syed says:

    How to export pages along with the child pages from the pdf export link provided...

    How to export pages along with the child pages from the pdf export link provided in each page as the admin can do from space admin?

    1. Oct 22, 2007

      Choy Li Tham says:

      Hi Imtiaz, In order to export pages along with the child pages to PDF export, y...

      Hi Imtiaz,

      In order to export pages along with the child pages to PDF export, you will need to grant with the "Export Space" permission from the Space administrator. Having that said, you would be able to export the selected pages as well as the child pages within a space unless you have the permission set. For more information regarding PDF export, the following documentation may serve as a reference to you:

      Regards,
      Choy Li

  9. Oct 28, 2007

    Gary Menzel says:

    We upgraded to 2.6.0 over the weekend.  We had cusomised the PDF footer to ...

    We upgraded to 2.6.0 over the weekend.  We had cusomised the PDF footer to add a version number (easy to add back in again) but we cannot find the neccessary FOP file for this (as documented above).  Furthermore, a search does not find this file anywhere.  Have we done something wrong - or has something changed dramatically?

    1. Oct 29, 2007

      Mei Yan Chan says:

      Hi Gary, In Confluence 2.6, these files have been archived in WEB-INF/lib/confl...

      Hi Gary,

      In Confluence 2.6, these files have been archived in WEB-INF/lib/confluence-2.6.0.jar. In order to make modifications to the file you mentioned above, there is a need to extract them and allocate it to the appropriate path. For more information, please see:

      Regards,
      Mei

  10. Nov 15, 2007

    Mike Kadlec says:

    Gentlemen, after reading all tech details here I ´ve got an impression that exp...

    Gentlemen,

    after reading all tech details here I ´ve got an impression that expecting nice an dtidy pdf output from Confluence is still sort of "mistery wish".

    Anyone have got a THE solution, please ?

    Thanks Mike 

    1. Nov 15, 2007

      Choy Li Tham says:

      Hi Mike, after reading all tech details here I ´ve got an impression that expec...

      Hi Mike,

      after reading all tech details here I ´ve got an impression that expecting nice an dtidy pdf output from Confluence is still sort of "mistery wish"

      Could you please elaborate more in details for the above statement so that we can verify from there? Thanks.

      Regards,
      Choy Li

      1. Nov 19, 2007

        Mike Kadlec says:

        Hi Choy Li Tham, lets point out just a couple of details here (I wish your resp...

        Hi Choy Li Tham,

        lets point out just a couple of details here (I wish your response is positive!)

        Does Confluence support :

        Bookmarks by a Header inside a page?

        Automatic pictuture/Figure numbering?

        Chapters numbering ?

        Automatic TOC ?

        Automatic list of pictures ?

        I understand that with this functionalities we would be looking at another sort of CMSystem.

        Best regards,

        Mike

        1. Nov 20, 2007

          Fennie Ng says:

          Hi Mike, Regarding your questions: Bookmarks by a Header inside a page? Conflu...

          Hi Mike,

          Regarding your questions:

          Bookmarks by a Header inside a page?

          Confluence allows user to use URL to make a bookmark. For more information on what Bookmarks can do, feel free to visit Working with Bookmarks. If you think this feature does not meet your requirement, feel free to raise a feature request at our JIRA issue tracker.

          Automatic pictuture/Figure numbering?Chapters numbering ?

          This feature is not implemented yet. However, we are aware of this need and it has been tracked here.

          Automatic TOC ?

          If you are referring to Portlet, Script, Hidden and TOC Macros, I am afraid you have to install this plugin manually or via Confluence Plugin Repository.

          Automatic list of pictures ?

          Confluence allows users to use the Gallery macro (you need to manually edit in 'Wiki Markup' mode to include macros in your page) that creates a gallery of thumbnails from all the images that are attached to a page and displays them in a tabular format.

          Regards,
          Fennie

          1. Nov 23, 2007

            Mike Kadlec says:

            Hi, thanks for the hints! We will elaborate on these issues and get back to ...

            Hi, thanks for the hints! We will elaborate on these issues and get back to this discussion when any question arises.

            Thanx,

            Mike

  11. Nov 29, 2007

    Tiffany Bartlett says:

    "These files can be copied out of the JAR to that location (confluence/WEB-INF/c...

    "These files can be copied out of the JAR to that location (confluence/WEB-INF/classes/...) to override the file in the JAR without having to repackage it." (see this issue: http://jira.atlassian.com/browse/CONF-9683)

    I had no trouble modifying the common_*fop.vm files. I placed the new files into the directory confluence/WEB-INF/classes/com/atlassian/confluence/importexport/ (which did not originally exist in 2.6, so I created it).

    However I'm still having trouble with the "This page was last changed on..." I modified Page.pdfexport.vm, Page-hierarchy.pdfexport.vm, and /space/Page.pdfexport.vm within /WEB-INF/lib/ where the confluence jar file was, but then I couldn't get Confluence to restart. Do I need to move these files somewhere else (similar to how the common_*fop.vm files had to be moved to /WEB-INF/classes/com/atlassian/confluence/importexport)?

    Any suggestions?

    Thanks!
    Tiffany

    1. Dec 03, 2007

      Tony Cheah Tong Nyee says:

      Hi Tiffany, However I'm still having trouble with the "This page was last chang...

      Hi Tiffany,

      However I'm still having trouble with the "This page was last changed on..." I modified Page.pdfexport.vm, Page-hierarchy.pdfexport.vm, and /space/Page.pdfexport.vm within /WEB-INF/lib/ where the confluence jar file was, but then I couldn't get Confluence to restart.

      To my understanding, you have made modification to the following files:

      • Page.pdfexport.vm
      • Page-hierarchy.pdfexport.vm

      If that is the case, may I know if you have try manually create the following directory path in the WEB-INF/classes/?

      com/atlassian/confluence/pages
      

      You will have to copy the customized Page.pdfexport.vm and Page-hierarchy.pdfexport.vm file onto the directory as created above. If the modified files are not being placed in the appropriate directory, the customization would not take effect.
      If I have misinterpreted your questions, please further clarify them for a better understanding.

      Cheers,
      Tony

      1. Dec 06, 2007

        Tiffany Bartlett says:

        Thanks -- that worked! -Tiffany

        Thanks -- that worked!

        -Tiffany

  12. Nov 30, 2007

    Ivan says:

    Hi, Atlassian! I have problems with following formatting objects tags expor...

    Hi, Atlassian!

    I have problems with following formatting objects tags export to pdf document

    <fo:bookmark-tree >
    <fo:bookmark >
    <fo:bookmark-title>

    It seems that they are ignored by pdf export engine because I do not see any bookmarks (TOC) in pdf document. Apache FOP project Compliance Page (http://xmlgraphics.apache.org/fop/compliance.html#fo-object-bookmarks-section) states that FOP 20.5 version does not supports this tags.

    Does confluence support fo:bookmark-tree, fo:bookmark tags, if not will you implement this?

    Thanks

    1. Dec 03, 2007

      Tony Cheah Tong Nyee says:

      Hi Ivan, You meant to say that you would like to export a single page onto PDF ...

      Hi Ivan,

      You meant to say that you would like to export a single page onto PDF format where bookmarks are available according to the headers in a page?
      Unfortunately, Confluence does not provide such feature at the moment. However, we are aware of such needs and have a open feature request being raised at:

      Feel free to cast your vote to increase its popularity and also add yourself as a watcher for future updates.

      Cheers,
      Tony

  13. Dec 10, 2007

    Anonymous says:

    Hi, are there any service providers out there which could implement a PDF output...

    Hi, are there any service providers out there which could implement a PDF output using our standard letterhead (aka doing the customization to the PDF export)?

    1. Dec 10, 2007

      Tiffany Bartlett says:

      I've customized our PDF export -- if you want to email me, I can explain...

      I've customized our PDF export -- if you want to email me, I can explain it in detail.

    2. Dec 16, 2007

      James Matheson says:

      I develop themes for my clients in which I often include modifications to the PD...

      I develop themes for my clients in which I often include modifications to the PDF output. You can see a theme that I developed for demonstration purposes at http://wiki.saikore.com/display/theme/Chassis+Theme. Click on the PDF icon at the top right to get the sample PDF output. Note that the typography, header and footer have been modified. If you want more information, contact me at Saikore.

  14. Jan 02, 2008

    Anonymous says:

    I cannot seem to access my custom Velocity context plugin module from the Page.p...

    I cannot seem to access my custom Velocity context plugin module from the Page.pdfexport.vm velocity macro file.

    I can access if from other velocity macros though.

    Any thoughts?  Thanks

    1. Jan 08, 2008

      Tony Cheah Tong Nyee says:

      Hi there, Please see the comment posted here. Cheers, Tony

      Hi there,

      Please see the comment posted here.

      Cheers,
      Tony

  15. Jan 11, 2008

    Pam Cole says:

    Can Confluence search the content of PDF files? It seems that it can search some...

    Can Confluence search the content of PDF files? It seems that it can search some PDFs but not others. Just wondering? Thanks

    1. Jan 14, 2008

      Tony Cheah Tong Nyee says:

      Hi Pam, Confluence uses a Java library called PDFBox to extract text in an att...

      Hi Pam,

      Confluence uses a Java library called PDFBox to extract text in an attached PDF file. It depends on the type of content in the PDF file on whether they are able to be searched. For example, there are issues in searching for content when the content is a scanned in(for example an image of text) to the PDF documents.
      Hope the information helps.

      Cheers,
      Tony

  16. Jan 13, 2008

    Ashim Ranadive says:

    Hi,  I have a page with tables that I am trying to export to PDF. However,...

    Hi,

     I have a page with tables that I am trying to export to PDF. However, once exported into PDF format, the column widths loose formatting and become standard. what this means is that for columns with large content, it becomes 'bunched up' and difficult to read.

     Is there anyway to export to PDF and retain table formatting.

    Same result is returned from MS Word.

    Setting static column/field widths in the page does not resolve the issue either.

    Tables have been created using both the repeating-data and table-data macros from the Scaffolding Plugin.

     Thanks

    Ashim

    1. Jan 14, 2008

      Tony Cheah Tong Nyee says:

      Hi Ashim, I believe you have encountered a bug already being tracked here: h...

      Hi Ashim,

      I believe you have encountered a bug already being tracked here:

      Feel free to add yourself as a watcher so that you will be notified if there are any updates in the issue.

      Cheers,
      Tony

      1. May 10, 2008

        David Page says:

        Hi Ashim, You should also look at CONF-5853 - I just added a comment (CONF-5853...

        Hi Ashim,

        You should also look at CONF-5853 - I just added a comment (CONF-5853 comment id 112495) that might be of interest. Repeated here for convenience:

        I have a work-around that works for me with confluence v 2.7.3

        I noticed the macros such as {info} and {tip} are formatted with tables (a column for the icon, a column for the message) and these items sort-of look ok in the generated PDF. So after a little digging I deduce that PDF export honors html <colgroup>!

        So you can use the excellent content formatting macros and include a <colgroup> in your table. Something like this:

        {table:width=100%|border=1}
        {colgroup}<col width='5%'><col width='10%'><col width='15%'><col width='20%'>{colgroup}
        {tr}
        {td}5%{td} {td}10%{td} {td}15%{td} {td}20%{td} {td}50%{td}
        {tr}
        {table}
        

        ... where {colgroup} is a user-macro that renders the body as html into the page - you can make your own variants

        Only define widths for the first (n-1) columns of an n-column table and everything should PDF well. Otherwise the PDF generates a table that goes to the very edge of the page.

        I hope it helps!

  17. Feb 26, 2008

    Anonymous says:

    Hi, I´d like to export a wiki page to pdf. no problem so far, but i´d like to i...

    Hi,

    I´d like to export a wiki page to pdf. no problem so far, but i´d like to include linked pages.

    I use a scheme of labelled pages being listed by the contentbylabel macro, and i´d like to export this list and the listed pages to a single pdf file in one go. The linked pages are stored all over confluece and i cant store them in just one individual space. How can I do that ?

    1. Feb 26, 2008

      Choy Li Tham says:

      Hi, I'm not aware of any workaround that can be used to fulfill your requiremen...

      Hi,

      I'm not aware of any workaround that can be used to fulfill your requirement. However, i have found a similar bug that is currently being tracked at the following:

      The bug report above stated that the links generated by the ContentByLabel macro are broken in a PDF export. Please add yourself as a watcher to get the notifications as well as add comment on the bug report above to truly reflect the problem that you are having.

      Regards,
      Choy Li

  18. Feb 27, 2008

    Anonymous says:

    Thanks for your help... I also experience the problem stated in that bug report....

    Thanks for your help... I also experience the problem stated in that bug report...sadly, the bug was filed june´06 (!) and has not been fixed yet.

  19. Apr 04, 2008

    Anonymous says:

    Hi, Something that was not clear to me: Images references in the templates use...

    Hi,

    Something that was not clear to me:

    Images references in the templates used to be relative and not a full URL in 2.5 (/a/confluence/logo/logo.gif worked)

    Now (2.6 onward?) it has to be a full file url (file:///a/confluence/logo/logo.gif)

    The text in this doc is correct but the code example for adding a header with a banner still shows the old way.

    Thanks

    Michael

    1. Apr 07, 2008

      Mei Yan Chan says:

      Hi Michael, I've updated the page accordingly. Please let us know if you have f...

      Hi Michael,

      I've updated the page accordingly. Please let us know if you have further queries.

      Regards,
      Mei

  20. May 16, 2008

    Jason says:

    Hi, On each page exported to PDF, I am trying to show the title of the 'section...

    Hi,

    On each page exported to PDF, I am trying to show the title of the 'section' that the page belongs too. Is there any way of displaying the title of a page from higher up the hierachy?

    Thanks

    Jason

    1. May 20, 2008

      Ming Giet Chong says:

      Hi Jason, I would advise you to direct your questions to our forum and mailing ...

      Hi Jason,

      I would advise you to direct your questions to our forum and mailing list as there might be other user/developers who have already implemented it and should be able to share their ideas with you.

      Regards,
      MG

  21. May 22, 2008

    Anonymous says:

    Hi all.  I have two issues; 1. how do I change the font size and color or...

    Hi all. 

    I have two issues;

    1. how do I change the font size and color or headings in pdf export? The contents of a page is generated by

                <fo:block>$rendererBean.exportWikiToXslFo($page)</fo:block>
    

     and this displays black brutal fonts.

    2. The tables when exported to pdf looses its formatting with backgroun color and borders when exported to pdf. why?

    using v. 2.8. 

    1. May 23, 2008

      Tony Cheah Tong Nyee says:

      Hi there, I believe you meant to say that you would like to customize the fon...

      Hi there,

      1. I believe you meant to say that you would like to customize the font size and color of the PDF content? To my understanding this is not possible as the content render is based on the fonts already defined in the page body content itself. One is only allow to customize the Page/Space title of the exported PDF itself, please refer to the "Modify Page Title" session of this page.
      2. There is a discussion being raised regarding table and PDF rendering at:
        • http://jira.atlassian.com/browse/CONF-11825
          Feel free to add yourself as a watcher so that you will be notified if there are any updates on the issue. Additionally, you can add comments to the bug report to reflect your idea to the participants.

      Cheers,
      Tony

  22. May 23, 2008

    Anonymous says:

    Hi there,  Current PDF exports do not allow commenting, I would like to cu...

    Hi there,

     Current PDF exports do not allow commenting, I would like to custimize generated document restrictions, like printing, content copying, signing and, indeed, commenting (which is currently not allowed)

    Is there a way to change this?

    1. May 23, 2008

      Tony Cheah Tong Nyee says:

      Hi there, Did you mean to say that you wish to be able to add comment on the ex...

      Hi there,

      Did you mean to say that you wish to be able to add comment on the exported PDF file? If this is the case, I believe it is not possible and I could not think of any workaround for this. You may want to try post your question in our forums or developer mailing list and see if there are users/developers who have experience in similar customization would share their idea with you.
      If I have misinterpreted your question, please further clarify it for a better understanding.

      Cheers,
      Tony

      1. May 23, 2008

        Anonymous says:

        No, I mean to say that the PDF document format in general and acrobat reader spe...

        No, I mean to say that the PDF document format in general and acrobat reader specifically incorporate a commenting system. However, this is only possible if in the security settings of the PDF document at hand, commenting is allowed, which is not the case with the confluence export. I would like to enable this in the result document.

         For more info on this PDF feature, see for instance http://www.accountingweb.co.uk/cgi-bin/item.cgi?id=164995&d=1032&h=1034&f=1026&dateformat=%25o%20%25B%20%25Y

  23. May 29, 2008

    Houston Haynes says:

    I'm looking for a means to embed the total number of pages for a PDF export alon...

    I'm looking for a means to embed the total number of pages for a PDF export alongside the individual page count in the footer. Is there a call (to the pager plugin or other function) that I can use that's an equivalent to the "page-number" field? I'm looking around for a reference and have come up empty so far. Thanks in advance.

    1. Jun 02, 2008

      Ming Giet Chong says:

      Hi Houston, Alternatively, I would advise you to direct your questions to our f...

      Hi Houston,

      Alternatively, I would advise you to direct your questions to our forum and mailing list as there might be other user/developers who have already implemented it and should be able to share their ideas with you.

      Regards,
      MG

    2. Jun 02, 2008

      James Matheson says:

      I recently built a theme for a client who needed this same feature. To do it, I ...

      I recently built a theme for a client who needed this same feature. To do it, I added the following snippet to the footer of the 'common_footer_fop.vm' file:

      <fo:block>
          Page <fo:page-number/> of <fo:page-number-citation-last ref-id="terminator"/>
      </fo:block>
      

      Note that you also need to define the 'terminator' ref-id. I have put it at the end of the Page.pdfexport.vm as follows:

       <fo:block id="terminator"></fo:block>
      

      My next challenge is to get the space logo to render in the PDF output again. It used to work, but it seems to have been broken sometime after 2.5.8.

  24. Jun 02, 2008

    Anonymous says:

    Is there a way to export a single page to PDF via the SOAP API?  All I can ...

    Is there a way to export a single page to PDF via the SOAP API?  All I can find is exporting an entire space (ie. String exportSpace(String token, String spaceKey, String exportType)).  Thanks.

    1. Jun 03, 2008

      Ming Giet Chong says:

      Hi, As I know, this is not supported in Confluence SOAP API currently. However,...

      Hi,

      As I know, this is not supported in Confluence SOAP API currently. However, there is a new feature request being raised at:

      Please cast your vote and add yourself as a watcher for future updates at the reported request. Thanks.

      Regards,
      MG

  25. Jun 03, 2008

    Anonymous says:

    I am using 2.7 and I can't seem to find common_footer_fop.vm or common_header_fo...

    I am using 2.7 and I can't seem to find common_footer_fop.vm or common_header_fop.vm files under my confluence directory structure.

    any help would be great.

    Thanking you in advanced

    regards

    Huet         

  26. Jun 03, 2008

    Tiffany Bartlett says:

    The common_footer_fop.vm and common_header_fop.vm are in the confluence-2.7.x.ja...

    The common_footer_fop.vm and common_header_fop.vm are in the confluence-2.7.x.jar file (/confluence/WEB-INF/lib).  You will need to extract the files, modify them, and then put them in the following path (if using Linux): /confluence/WEB-INF/classes/com/atlassian/confluence/importexport/common_****_fop.vm.

     -Tiffany (email me if you need more help)

    1. Jun 13, 2008

      anja gruss says:

      with Confluence 2.8.0 we have the following problems in our PDF export Table bo...

      with Confluence 2.8.0 we have the following problems in our PDF export

      Table borders are not shown, graphics attached with 800x600 are scaled down more than necessary (to about 690px width)

      and the background and border of note / tip boxes are not shown

      Does anyone have a solution how to fix this? At least the styles for the boxes?

      thanks in advance

      /anja 

    2. Aug 27, 2008

      Anonymous says:

      Hi Tiffany,  My company decided not change the PDF's back in Jan.  Bu...

      Hi Tiffany,

       My company decided not change the PDF's back in Jan.  But it has now raised it head again.  We are now using version 2,8.2

      Also I thought I replied back to say thank you for the reply sorry for that.

      /opt/confluence/confluence-2.8.2/confluence/WEB-INF/lib/confluence-2.8.2.jar

      I have searched the above file for the common_*.vm files and I cant seem to find them, have they moved to somewhere else in this version of confluence

      regards

      Huet

      1. Aug 27, 2008

        Anonymous says:

        Hi Tiffany, I have found them now. regards Huet

        Hi Tiffany,

        I have found them now.

        regards

        Huet

        1. Aug 27, 2008

          Tiffany Bartlett says:

          Great -- I was just looking for them.

          Great -- I was just looking for them.

  27. Jul 02, 2008

    Anonymous says:

    I agree with Anja We've just upgraded to 2.8.1 and our PDF exports bear little ...

    I agree with Anja

    We've just upgraded to 2.8.1 and our PDF exports bear little resemblance to the actual Confluence page.  Borders have vanished everywhere!

    Is this something we could rectify ourselves?

    -- Michael

    1. Jul 03, 2008

      Azwandi Mohd Aris says:

      Hi Michael and Anja, Please take a look at CONF-11825 and CONF-11996 for the bu...

      Hi Michael and Anja,

      Please take a look at CONF-11825 and CONF-11996 for the bug reports regarding this issue. According to the reports, the bug has been fixed and scheduled for the next major release of Confluence.

      Cheers,
      Azwandi

  28. Jul 25, 2008

    Roberto Arias says:

    Hi, I've posted this on a couple of discussions elsewhere in Confluence, hope I ...

    Hi,
    I've posted this on a couple of discussions elsewhere in Confluence, hope I get lucky here

    We are trying to include in a summary page (first page) of the exported PDF (from a Confluence Page), all the required fields by our corporate documentation guidelines, like author, revision, approved by, internal version number, etc. I tried creating templates ( http://confluence.atlassian.com/display/DOC/Working+with+Templates+Overview ), but the created template variables are not accessible from the .fo (Velocity) templates.

    My questions:

    1. How can I create a set of variables to be used only while exporting a page to PDF?
    2. Is developing a custom module the way to go here?

    I wonder if its possible to access custom defined macro variables from the .fo template (in Velocity). For example:

    {document-summary:author=myself|approved-by=someguy|version=2.3}
    

    The Macro would be used just to render the PDF's, and ignored in the rest of Confluence (wiki, doc generation, etc.) The variables author, approved-by and version would be used in the pdfexport.vm.

    Cheers,

    Robert

    1. Oct 16, 2008

      Anders Raneland says:

      I would also like to know if this is possible. I would like to have a standard (...

      I would also like to know if this is possible.
      I would like to have a standard (first page) with div info on, but only when we export it to a pdf document.

      Anyone who knows any good resources for more information about the capabilities of Velocity. How can you use it with confluence?

       Cheers,

       /Anders

      1. Oct 20, 2008

        Tony Cheah Tong Nyee says:

        Hi Anders, If you are interested to know more regarding velocity usage in Confl...

        Hi Anders,

        If you are interested to know more regarding velocity usage in Confluence, please check out the overview page of it at:

        Hope the information helps.

        Cheers,
        Tony

  29. Nov 26, 2008

    Nata Ramanenka says:

    Hello Guys, Where can I find the listed pdf templates (.vm files) in version 2.9...

    Hello Guys,
    Where can I find the listed pdf templates (.vm files) in version 2.9? I do not want to check every .jar file in WEB-INF/lib/...

    After I find the files and change, I should upload them to

    .../confluence/importexport/
    .../confluence/pages/

    and restart Confluence?

    Thanks.

    1. Dec 02, 2008

      Arie Murdianto says:

      Hi, Confluence is using space.pdfexport.vm and page.pdfexport.vm files as a tem...

      Hi,

      Confluence is using space.pdfexport.vm and page.pdfexport.vm files as a template. But those files are used to create an fo file which is used by Confluence to create PDF file. As you may know that Confluence is using Apache FOP to export page to PDF. In order to export page or space, Confluence needs fo file which will be converted to PDF.

      Please have a look at the following page:

      If you wanna make a change on the files, you need to re-package them again in the jar file (confluence-x.x.x.jar) and put back in the <Confluence install>/confluence/WEB-INF/lib

      Cheers,

  30. Dec 02, 2008

    Anders Raneland says:

    Anyone knows how to get the TOC macro/plugin to work on pdf exports. It does not...

    Anyone knows how to get the TOC macro/plugin to work on pdf exports. It does not render the links correctly. I would like to be able to click on a link/anchor in the pdf document and jump inside the document, not to the web page.

    Thanks.

    1. Dec 06, 2008

      Bo Wang [Atlassian] says:

      Hi Anders, This was a known bug in the PDF export functionality of Confluence w...

      Hi Anders,

      This was a known bug in the PDF export functionality of Confluence where anchor links were not included within the exported PDFs (see CONF-8748), this has been fixed in Confluence 2.10 so you may want to consider upgrading to allow this functionality.

      Regards,
      Bo Wang

  31. Jan 28

    Giuliano Lima says:

    Hi, is it possible to translate the headers and footers of the exported pdf fil...

    Hi,

    is it possible to translate the headers and footers of the exported pdf file to the language in which confluence is being ran? E.g. If I run confluence in English I want a pdf with english footer, if I run it in German, then I want a footer in German. I can translate it from English into another language, but then all exports will have this language...

    In our company we have the problem that we have spaces in several languages, and it is quite a big problem for us that the language of the pdf's header and footer is fixed.

    Cheers,

    Giuliano

    1. Feb 23

      Komathi Krishnan [Atlassian] says:

      Hi Giuliano, This questions has been answered in another page. Refer here for t...

      Hi Giuliano,

      This questions has been answered in another page. Refer here for the answer. Hope that helps.

      Cheers,
      Komathi

  32. Mar 16

    Anonymous says:

    One more question. Is it possible to insert some text into header (or footer) o...

    One more question.

    Is it possible to insert some text into header (or footer) of eksported pdf (in space export), but txt, that could be changed withiout restarting confluence? I have a situation, where it is number of documents in one space, and it would be great if I could insert come comment (for example document title...) in the moment of exporting...

    Cheers,
    Piotrek

    1. Apr 03

      Arie Murdianto says:

      I am afraid that you cannot do that. You need to edit the common_footer_fop.vm (...

      I am afraid that you cannot do that. You need to edit the common_footer_fop.vm (this file is inside confluence-x.x.x.jar) to change the exported page to PDF and restart it so that it takes an affect.

  33. Apr 22

    Anonymous says:

    Just FYI: Your page title example appears to be out of date for 2.10.x $render...

    Just FYI: Your page title example appears to be out of date for 2.10.x

    $rendererBean.nativeToAscii($generalUtil.escapeXml($page.title))

    appears to now be:

    $generalUtil.htmlEncode($page.title)

    1. Apr 24

      Arie Murdianto says:

      Hi, Thanks for the information. You can use that way as well as it will escape ...

      Hi,

      Thanks for the information. You can use that way as well as it will escape some characters.

      Cheers

Add Comment


Except where otherwise noted, content in this space is licensed under a Creative Commons Attribution 2.5 Australia License.