 | 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
How to Change the page size
The default PDF page size is A4 (210mm x 297mm or 8.27in x 11.7in). Modify the file under your Confluence install directory:
To change the page size for PDF export, page-width and page-height parameters have to be edited in the above mentioned file. Locate the line
and change the values for page-width and page-height as required.
This file is pretty self-explanatory. Change to the following values:
- page-width="21.59cm"
- page-height="27.94cm"
Optionally you can modify the margins. To give the page a half-inch margin all around:
- margin-right="1.27cm"
- margin-left="1.27cm"
- margin-bottom="1.27cm"
- margin-top="1.27cm"
Landscape orientation
To change the default A4 +Portrait+ size to +Landscape+ follow the instructions below:
By default the page orientation for PDF export is set to "Portrait" with
page-width="21cm" and
page-height="29.7cm". To change the orientation to Landscape, swap the page-width and page-height measurement values as shown below:
This will generate a PDF export with a Landscape orientation.
Editing PDF content
How to edit PDF content:
Confluence uses
Apache FOP to write Confluence content to
XSL-FO format, and uses Velocity macro files to render PDF headers, footers and page titles. For information on more content editing, study the
XSL-FO examples.
Always stop Confluence before editing a Velocity macro file. Users who are stuck can obtain technical assistance by posting the modified Velocity file to the Confluence Developer Forum.
List Of PDF-Related Files
* The above example is for Unix-based systems, so Windows users should use back-slashes instead forward-slashes
- An example Windows install directory is C:\confluence-2.2.9-std
- An example Linux install directory is /opt/confluence-2.2.9/
Text
Inserting the example XSL-FO tag below into the relevant Velocity macro file will output a new line with This text is printed in plain text.
Images
There are two steps involved in adding images to the header and the footer:
- You need to modify common_fop.vm and adjust the margins, and sizes of the two regions (region-before and region-after) to fit in the image.
In the example above, change the "1cm" value to allow yourself as much space as you need for your customization.
- Insert the example XSL-FO tag below into the relevant Velocity macro file to embed the local image c:\images\operahouse.png into the PDF.
You will need to convert the file location into a "file URI" before adding it the macro file.
For Windows systems, the method is to replace all back-slashes in the local path with forward-slashes and prefix the result with file:///
For UNIX-based systems prefix the path with file:// eg /tmp/image.png becomes file:///tmp/image.png
There is a good explanation for this format in Windows here and if you're really keen (or having problems) a fuller description is here.
Modify Page Title
Modify page title for single page export
This title appears once on the first page of the PDF. An example title is
To modify the page title, go to your Confluence install directory and modify the Velocity macro file
If you want the modification of the page title to take into effect for space export, go to your Confluence install directory and modify the Velocity macro file
The file contents are shown below
Explanation of the Velocity code from the above example
| Velocity Code |
Prints |
| $generalUtil.escapeXml($page.space.name) |
Space Name |
| $rendererBean.nativeToAscii($generalUtil.escapeXml($page.title)) |
Page Name |
Modify Page Headers for Space Export
How to modify page headers
By default, no page header is printed with PDF exports. To add one, go to your Confluence install directory and modify the Velocity macro file
Example Header Modification
In between the two FO lines, add
Example Header Modification with Banner
Below is a sample common_header_fop.vm velocity template for header with Banner.
 | If you can't see your banner or image, update the value of <fo:region-before extent="1cm"/> in the common_fop.vm template to 4 or 5 cm according to the size of your banner or image. Please see CONF-9082 for a feature request on increasing the default value. |
A Sample of Custom PDF Header with A Banner on the top

A Sample of Custom PDF Header with A Logo on the Right Top

Modify Page Footers for Space Export
How to modify page footer
Page footers appear on the bottom of every page. An example footer is
To modify the footer, go to your Confluence install directory and modify the Velocity macro file
Example Footer Modification
To produce this footer
Locate this line in common_footer_fop.vm
Replace it with the following Velocity code
To produce a footer with a ruler on top and page number on right and some copy right content on bottom then you can use the sample common_footer_fop.vm template below
Sample PDF Footer Image:

Exporter Velocity Context Additions
Velocity context objects specific to PDF exporting
In addition to the objects available to all exporters, the PDF exporter has access to the following additional objects:
(When exporting entire spaces)
| Velocity Reference |
Description |
Javadoc Reference |
| $space |
The Space object for the space being exported. |
Space |
| $contentTree |
A ContentTree object representing the hierarchy of pages in the space to be exported. |
ContentTree |
(When exporting single pages)
| Velocity Reference |
Description |
Javadoc Reference |
| $page |
The Page object for the page being exported. |
Page |
Export PDF in another Language
How to export in a different language
Comments (77)
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?
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
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?
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
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!
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.
Let me know if you need additional information.
Thanks,
Ib
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
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
Jul 21, 2007
hernan g says:
Modify page title for single page export But what about when we use space expor...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?
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?
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
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
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.
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
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?
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?
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
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?
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
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
Nov 15, 2007
Choy Li Tham says:
Hi Mike, after reading all tech details here I ´ve got an impression that expec...Hi Mike,
Could you please elaborate more in details for the above statement so that we can verify from there? Thanks.
Regards,
Choy Li
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
Nov 20, 2007
Fennie Ng says:
Hi Mike, Regarding your questions: Bookmarks by a Header inside a page? Conflu...Hi Mike,
Regarding your questions:
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.
This feature is not implemented yet. However, we are aware of this need and it has been tracked here.
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.
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
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
Nov 29, 2007
Tiffany Bartlett says:
"These files can be copied out of the JAR to that location (confluence/WEB-INF/c...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
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,
To my understanding, you have made modification to the following files:
If that is the case, may I know if you have try manually create the following directory path in the WEB-INF/classes/?
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
Dec 06, 2007
Tiffany Bartlett says:
Thanks -- that worked! -TiffanyThanks -- that worked!
-Tiffany
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
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
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)?
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.
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.
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
Jan 08, 2008
Tony Cheah Tong Nyee says:
Hi there, Please see the comment posted here. Cheers, TonyHi there,
Please see the comment posted here.
Cheers,
Tony
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
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
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
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
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 hope it helps!
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 ?
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
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.
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
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
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
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
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
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.
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,
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
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?
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
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
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.
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
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.
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.
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
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
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)
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
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
Aug 27, 2008
Anonymous says:
Hi Tiffany, I have found them now. regards HuetHi Tiffany,
I have found them now.
regards
Huet
Aug 27, 2008
Tiffany Bartlett says:
Great -- I was just looking for them.Great -- I was just looking for them.
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
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
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:
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
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
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
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.
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,
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.
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
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
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
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
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.
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)
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