Confluence's PDF Export feature addresses the most highly voted improvement request for Confluence — more control over PDF exporting. Users can customise their PDF exports using a PDF Stylesheet, which is specific to each space in a Confluence installation. The following aspects of PDF exports can be customised:
- Page and margin sizes
- Headers and footers, each with customisable content such as page numbering
- A customisable title page, which can incorporate images
- Built-in support for table of contents with page numbering
| Most PDF Stylesheet customisations are handled using Cascading Style Sheets (CSS), while customisations to headers, footers and the title page are handled using a combination of custom HTML and CSS. Hence, you should be familiar with these technologies (or may require some familiarisation with them first), before implementing the customisations you require. |
On this page:
Customising the style of PDF exports
PDF export customisations are specific to each space.
To customise PDF exports, you will need the 'Space Administrator' permission which is assigned by a space administrator from the Space Administration screens. See Space Permissions or contact a space administrator for more information.
There are two areas that control the customisation of space-level PDF exports in Confluence. These are the 'PDF Layout' and 'PDF Stylesheet'.
PDF Layout
To access the PDF Layout for customisation,
Go to the 'Space Admin' tab of the Browse Space view. To do this:
- Go to a page in the space, open the 'Browse' menu and select 'Space Admin'. The 'Space Administration' view will open.
'Space Admin' is only displayed if you are a space administrator for that space or you are a Confluence system administrator.
- Go to a page in the space, open the 'Browse' menu and select 'Space Admin'. The 'Space Administration' view will open.
- Click 'PDF Layout' in the left-hand panel. The main screen displays the current contents of your PDF Layout customisations. The PDF Layout is divided into the following three sections and allow for modifications to the:
- PDF Space Export Title Page - containing custom HTML that generates the exported document's front title page.
- PDF Space Export Header - containing custom HTML that generates headers throughout the exported content.
- PDF Space Export Footer - containing custom HTML that generates footers throughout the exported content.
- Click the 'Edit' button and each of these three sections expands to an editable text box.
- Enter your customisations into each text box section as required and click 'Save' to save them.
PDF Stylesheet
To access the PDF Stylesheet for customisation,
Go to the 'Space Admin' tab of the Browse Space view. To do this:
- Go to a page in the space, open the 'Browse' menu and select 'Space Admin'. The 'Space Administration' view will open.
'Space Admin' is only displayed if you are a space administrator for that space or you are a Confluence system administrator.
- Go to a page in the space, open the 'Browse' menu and select 'Space Admin'. The 'Space Administration' view will open.
- Click 'PDF Stylesheet' in the left-hand panel. The main PDF Export Stylesheet section on the right displays the current contents of your PDF Stylesheet customisations, which contains all CSS rule customisations applied to the pages in the space.
- Click the 'Edit' button and the 'PDF Export Stylesheet' section expands to an editable text box.
- Enter your customisations into the text box as required and click 'Save' to save them.
| Refer to the Basic Customisations section for examples of typical customisations that can be added to your PDF Stylesheet. Once you are familiar with the implementation of basic PDF stylesheet customisations, you may wish to try out some Advanced Customisations. |
|
|
Basic Customisations
Page Customisations
Modifications to page and margin sizes are made in the @page CSS rule.
To make changes to this rule, you would implement the following type of code in the 'PDF Export Stylesheet' of the PDF Stylesheet.
@page
{
/*Page specific styles (that is, customisations of properties) go here*/
}
Customising the Page Size
The default page size is based on the locale of your Confluence server. Hence, if this server was located in the US, the default paper size of your PDF export would be US Letter size (8.5 inches wide by 11 inches long). If the server was located in Australia, the default paper size would be A4 (210 mm wide by 297 mm high).
To modify the page size to A4, add a size property to the top of the rule like this:
@page
{
/*The A4 paper size is 210 mm wide by 297 mm high*/
size: 210mm 297mm;
}
More information about paper sizes can be found on Wikipedia.
Customising the Page Margins
To add a margin of 15 mm to a paper size of A4, your CSS @page rule would look like this:
@page
{
size: 210mm 297mm;
margin: 15mm;
}
Customising the Table of Contents
By default, a table of contents will be generated after the title page, or at the beginning of the document if the 'PDF Space Export Title Page' (of the PDF Layout) is not defined. The look and layout of the table of contents is completely customisable by defining the appropriate CSS rules in the 'PDF Export Stylesheet'.
For details about the CSS rules governing the default styles applied to the table of contents output in PDF exports, download the default CSS rules (from the link above) and examine the specific rules with toc in its name.
Disabling the Table of Contents
To prevent the table of contents being generated in your exported PDF document, add the div.toc rule to the 'PDF Export Stylesheet' section of the PDF Stylesheet and set its display property to none:
div.toc
{
display: none;
}
Change the Leader Character
The leader character is used to visually link the name of a heading in the table of contents list with its page number, which is usually aligned to the page's right-hand margin. By default, the leader character is the '.' (dot) character. However, it can be changed by customising the leader character CSS rule span.toclead:before and adding this to the 'PDF Export Stylesheet' section of the PDF Stylesheet.
To change this to a solid line, modify this CSS rule accordingly:
span.toclead:before
{
content: leader(solid);
}
To change this it to spaces (that is, blank space), modify this CSS rule to:
span.toclead:before
{
content: leader(space);
}
Be aware that using a space as a leader character can make the table of contents list difficult to read.
Adding a Title Page to PDF-Exported Space or Subsection
You can create a title or cover page for an PDF-exported space or subsection using XHTML. Use the 'PDF Space Export Title Page' section of the PDF Layout to do this. The following XHTML code example uses an inline CSS rule to generate a title page.
<div class="fsTitlePage" style="margin-left:auto;margin-top:75mm;margin-right:auto;"> <img src="/download/attachments/12345/titlepage.png"/> </div>
In the example above, an image called 'titlepage.png' will be centred in the middle of the page. This image is attached to a Confluence page and is referenced via its relative URL (that is, without the Confluence site's base URL component).
You can obtain the URL of an image attached to a Confluence page by viewing the list of attachments on that page and moving your mouse over the attachment's name. The URL of the image should appear in your browser's status bar or you can copy the link. Once you have this link, paste it into the appropriate src="" attribute within your PDF stylesheet and remove the first part of the URL up to the /download/... part.
Adding Headers and Footers
Headers and footers can be added to a PDF-exported space or subsection also using XHTML. Use the 'PDF Space Export Header' and 'PDF Space Export Footer' sections of the PDF Layout to create a custom header and footer, respectively. For simple headers and footers, plain text is sufficient. The following example added to a header or footer will create a simple copyright notice.
Copyright © 2009, Atlassian Pty Ltd.
Adding page numbering to a header or footer
To add page numbering to your documentation, you need to combine some customised XHTML in the header or footer along with some customised CSS in the 'PDF Export Stylesheet'.
First, create a header or footer with an empty span element and give it a unique id, for example pageNum (although this could be anything). This is the page number 'place holder' in your exported PDF document.
<span id="pageNum"/>
Next, create the following CSS selector rule for this empty span and add it to the 'PDF Export Stylesheet':
#pageNum:before
{
content: counter(page);
}
This will add a page number to your header or footer.
| Analysing this CSS selector rule in more detail, the #pageNum selects the XHTML element with the specified id of "pageNum", which is the span element we created for the header or footer. The :before part of the selector is a 'pseudo class' that allows the insertion of content before the span element is processed. The counter(page) is a function that returns the current page number as its content. Finally, the content property inside the rule tells the CSS processor that dynamic content (that is, an incrementing page number) is to be inserted before the span tag. |
General Formatting
You can also use the stylesheet to customise the output of just about anything else that will influence the look and feel of the final document. This includes fonts, tables, line spacing, macros, etc. The export engine works directly from the HTML output produced by Confluence. Therefore, the first step in customising something would be to find a selector for the HTML element produced by Confluence or the Confluence macro. Next you would add a CSS rule to the 'PDF Export Stylesheet' and your customisation would appear in the PDF export.






Comments (48)
Jun 03, 2009
Hugo Lassiège says:
Hi, Maybe I missed something but I can't make it work. I use the following vers...Hi,
Maybe I missed something but I can't make it work. I use the following version :
I wrote
#pageNum:before { content: counter(page); }In PDF Export style sheet
<div class="fsTitlePage" style="margin-left:auto;margin-top:75mm;margin-right:auto;"> TITRE CUSTOM </div>In PDF export TITLE page
And
In PDF Export footer
However my export don't have any title nor footer. Did I missed something ?
Jun 03, 2009
Giles Gaskell [Atlassian Technical Writer] says:
Hello Hugo, Could you please confirm if you attempted to: Export a single pag...Hello Hugo,
Could you please confirm if you attempted to:
(Refer to Confluence to PDF for more information.)
If you followed point 1, then only the PDF Export stylesheet settings apply to the page you exported and not the remaining PDF Stylesheet options (i.e. PDF Export Title Page, ...Header and ...Footer). Furthermore, you won't get the PDF Stylesheet's built-in table of contents listing either, although this might not be that useful for single page exports.
If you do want to include a title page, header and footer to a single page PDF export, please use the PDF Export feature described in point 2. Then on the PDF Export page, clear all the check boxes using Clear All and then select the individual page you want to export.
Incidentally, I will add this information in the documentation above.
If what I've described does not help and you were actually conducting a multiple-page export (using the approach in point 2), then please raise a bug report in JIRA.
However, if you are exporting a single page (using the approach in point 1) and would like the option to apply headers and footers to this type of export, you might want to raise this as a feature request in JIRA.
Best regards,
Giles Gaskell
Technical Writer
ggaskell@atlassian.com
ATLASSIAN - http://www.atlassian.com
Jun 10, 2009
Anonymous says:
As we need a front page and and footer and header info in individual page export...As we need a front page and and footer and header info in individual page exports and we managed to do this in 2.10 using the "old" method (editing some internal files). I wonder if we can use this in 3.0 as well?
Jul 29, 2009
Ryan Ackley says:
Thanks for your feedback. We have two exports. One is exporting a single Conflu...Thanks for your feedback.
We have two exports. One is exporting a single Confluence page. The other is exporting a an entire Confluence space consisting of many Confluence pages. We tailored the functionality based on the use case. The functional difference between the two is that the single page export doesn't get a cover page, table of contents, or headers and footers. It still gets the CSS stylesheet applied to it.
Generally speaking, a single confluence page is part of a larger body of work, so putting a cover page and table of contents wasn't a common scenario for exporting a single page. We anticipated that some people would still want this so a workaround is to select a single page through the space export and have all of these things apply.
This new PDF export feature is still evolving, although its design makes it much more extensible than its predecessor. We will continue to shape it based on your feedback. Please file an issue at http://jira.atlassian.com that explains what you need.
Jun 03, 2009
Tim Lindsay says:
hi, In version 2.10 I was able to make modifications to xhtmlfo.xsl to implemen...hi,
In version 2.10 I was able to make modifications to xhtmlfo.xsl to implement things such as inserting page breaks, just wondering if this is still possible or is there a simpler/better way of doing this.
tks
..oops... should hav checked the doco first, can prolly do something like this in the stylesheet...
div.pagebreak
{
page-break-before: always;
}
and then put a div on my page where I want the pagebreak to go, with a classname of "pagebreak"
...YEP!!! it works, this rocks!!!!
Jun 04, 2009
Hugo Lassiège says:
Thanks a lot Giles, I didn't understood the first time I tried but now it's clea...Thanks a lot Giles, I didn't understood the first time I tried but now it's clear and it's working on my installation.
I think you should describe the way the TOC is generated also because I thought the toc would be generated from sections h1, h2, h3 etc... and it is generated from the hierarchy position of the pages in the tree of pages.
Bye
Jun 04, 2009
Matthias Alder says:
If you want to have a footer on a page-export (not just on a space-export) you c...If you want to have a footer on a page-export (not just on a space-export) you could do something like that:
@page { margin: 0.5in; padding: 1em; @bottom-right { content: counter(page); font-family: ConfluenceInstalledFont, Helvetica, Arial, sans-serif; font-size: 8pt; } @bottom-left { content: "Some text"; font-family: ConfluenceInstalledFont, Helvetica, Arial, sans-serif; font-size: 8pt; } }Jul 29, 2009
Anonymous says:
great. at least someone (not Atlassian) is being very helpful here. do you know...great. at least someone (not Atlassian) is being very helpful here.
do you know how to make the top of the pdf show a company logo?
Jul 29, 2009
Ryan Ackley says:
The easiest way to export a single page with all of the customizations is to go ...The easiest way to export a single page with all of the customizations is to go to the Space PDF Export, insert the appropriate HTML for your image in the header or footer section of the PDF stylesheet and then select only the single page you wish to export.
Matthias posted a great work around above. You might be able to do something like (I haven't tried this)
@page { margin: 0.5in; padding: 1em; @bottom-right { content: counter(page); font-family: ConfluenceInstalledFont, Helvetica, Arial, sans-serif; font-size: 8pt; } @bottom-left { content: url("http://some.image.url.here") font-family: ConfluenceInstalledFont, Helvetica, Arial, sans-serif; font-size: 8pt; } }The key part is
content: url("http://some.image.url.here")where you replace the url with your image url.
Oct 23
Anonymous says:
This solution isn't working for me. It should... But it isn't.This solution isn't working for me. It should... But it isn't.
Sep 01
Wim Deblauwe says:
Thanks for this. How did you know about those @bottom-right, @bottom-left ? Is t...Thanks for this. How did you know about those @bottom-right, @bottom-left ? Is there something equivalent for the top? Is there something for centering (@bottom-center?)
regards,
Wim
Sep 01
Wim Deblauwe says:
I just tried and @bottom-center and @top-left all work fine. I just don't manage...I just tried and @bottom-center and @top-left all work fine. I just don't manage to use an url. Is there anybody who has this working? I already double-checked my image url. I tried with png and gif image, nothing seems to work. The place where the image should appear stays blank. I can use the image fine using the html with the space export, but in this single page workaround it does not seem to work.
Sep 03
Anonymous says:
Same question as above. Anyone who has manage to use the url workaround:content:...Same question as above. Anyone who has manage to use the url workaround:content: url("http://some.image.url.here");
Atlassian: I´m very disappointed that you only have released an half finished solution of the pdf export function.
Jun 04, 2009
Matthias Alder says:
Is there a way to make global changes? Not just for a space? Can I edit somewher...Is there a way to make global changes? Not just for a space? Can I edit somewhere the default PDF stylesheet?
Aug 27
Giles Gaskell [Atlassian Technical Writer] says:
Hello Matthias, Thanks very much for your suggestion on how to apply headers an...Hello Matthias,
Thanks very much for your suggestion on how to apply headers and footers to single page exports.
In answer to your second comment, unfortunately at this stage, you cannot apply a single set of customisations across multiple spaces since PDF Stylesheet settings are space-specific. Hence, you'll need to apply your PDF Stylesheet customisations individually to each space.
The PDF Stylesheet feature was designed this way as many customers wanted full flexibility over customising PDF exports for each space on their Confluence installations - particularly for headers, footers and title pages.
Incidentally, the default PDF stylesheet (attached to this page) is made available for customisation. You can download it from the 'download' link above (towards the end of the 'Customising the style of PDF exports' section on this page). Once you've modified the relevant rules in this file to your requirements, copy and paste them into the PDF Export Stylesheet section of this feature.
Nevertheless, if you'd like to see a global PDF stylesheet feature in Confluence, I suggest you raise a feature request on our JIRA site.
Best regards,
Giles Gaskell
Technical Writer
ggaskell@atlassian.com
ATLASSIAN - http://www.atlassian.com
Jun 10, 2009
Anders Raneland says:
Is it possible to use the "old" (2.10 etc..) pdf creation style(sheet) method in...Is it possible to use the "old" (2.10 etc..) pdf creation style(sheet) method in the 3.0 version? The old way was to edit common_footer_fop.vm, common_fop.vm, common_header_fop.vm, Page.pdfexport.vm.
We have a solution that works for us now (the old way on a 2.10 installation) and the new improved way breaks this. When we exports a page we and our customers always use the export to pdf feature from the Tools menu.
1 page = 1 document/user manual. We are working on a publishing solution (to an external site) with confluence on both sites, and with the new improved confluence we can´t proceed. up to now we have solved all our problems
with extrnal scrips etc. but this new way of creating pdf stops us from moving on.
We could theoretically go ahead with our project running on 2.10, but 3.0 offers so many improvements and as we don´t know how confluence will evolve in the future, i´m not sure we are willing to take that risk.
I believe that it´s fine that you do and upgrade of the functionality but don´t break the backward compatibility until you have solved all of the problems. For instance, why not have a global settings for pdf export that
can be overridden on space and even page level?
The new way to setup pdf exports is a step i the right direction tho we don´t need to keep track of all our modifications on an upgrade. Thats one of the problems with the old way of configuring pdf export (as I see it).
Regards
Anders
Dec 09
Giles Gaskell [Atlassian Technical Writer] says:
Hello Anders, Unfortunately, it's not possible to use the old PDF export custom...Hello Anders,
Unfortunately, it's not possible to use the old PDF export customisation methods you're referring to (also described on this page) in Confluence 3.0.
The PDF export engine in Confluence 3.0 has effectively been re-written from the ground up to provide much greater flexibility over PDF export customisations. This in itself has addressed many customer improvement requests that were limited by the older PDF export engine in Confluence 2.10.3 (and earlier versions). All PDF export styling modifications in Confluence 3.0 are now implemented via the PDF stylesheet customisation approach described on this page.
If you would like to implement headers and footers for single-page exports, you could try using the method described in Matthias Alder's comment (above).
If you have any other improvement requests for this feature, then I recommend raising a JIRA feature request.
I hope this information helps.
Kind regards,
Giles Gaskell
Technical Writer
ggaskell@atlassian.com
ATLASSIAN - http://www.atlassian.com
Sep 18
Corey Hampton says:
Since Atlassian is aware of the problem of users not knowing how to write code f...Since Atlassian is aware of the problem of users not knowing how to write code for the PDF Export, is it possible to post some common options used. We typically export a page, not the entire space. I have been able to get the page number to work, but that's it. I would like to have the space name with the location of the page, basically the breadcrumbs, along with the date. I have posted my code below. Any assistance would be appreciated, or even how to made the exports look like the 2.10 version.
Such as:
Jan 29
Andreas Camenzind says:
This would be great, because I do have the same issues here as well. Could that ...This would be great, because I do have the same issues here as well. Could that then work for a Space as well?
Jun 10, 2009
Ryan Bovorasmy says:
I like the idea behind being able to edit PDF output, but IMHO this feature will...I like the idea behind being able to edit PDF output, but IMHO this feature will almost never be used due to the non-functional aspects of it's implementation. Here's why:
Taken together, this is the workflow behind changing PDF output, for a typical user and admin:
By this time, the user could have just opened the page in word and manually made the changes. It also creates too much work for the admin (if it ever even gets this far), and allows the tastes of 'more important' users to be forced upon less-privileged users. For some situations this makes sense, but not printing.
Does anyone else think it would make more sense for each user to have their own PDF style, as opposed to each space having one (or any other similar solution)? It makes very little sense to me why a user should a) need space admin privs in order to pretty-print a page they can already view, or b) have to ask me to do it for them
.It also doesn't make sense that when one user wants to change the way something is printed, that all other users have to print it that way. Or that two documents in the same space must be printed the same way. You get the idea..
Jun 10, 2009
Ryan Bovorasmy says:
I should add that most users would probably request a change like this be made f...I should add that most users would probably request a change like this be made for a single document. After the document it exported, they won't care again until they need a different document printed: and they'll know that you, the admin, have the ability to change it for them... so in the end, most users will get stuck with what's in there after the honeymoon phase for this feature is over.
Jun 19, 2009
Corey Hampton says:
Does anyone know what I need to enter in the stylesheet to get the PDF to export...Does anyone know what I need to enter in the stylesheet to get the PDF to export the same as it did in 2.10? We thought it worked just fine and now when we export the font is smaller, and there's no header or footer. This is just for a page export.
I'm really surprised to see the defualt export completely removed. Now I need to re-create it and go back and add it it every space. Couldn't it function as the other style sheets where it can be set globally and then changed at the space level?
Aug 12
Azwandi Mohd Aris [Atlassian] says:
Hi Corey, Confluence 3.0 introduced a new PDF export functionality, which is di...Hi Corey,
Confluence 3.0 introduced a new PDF export functionality, which is directly based on the HTML and CSS of the page. There is no more conversion from HTML -> XSL-FO + FOP -> PDF. However, the following are the feature requests that I think might be helpful for you:
Feel free to vote for them, add your comments and 'watch' the requests for future updates.
Cheers,
Azwandi
Aug 12
Corey Hampton says:
Thanks Azwandi, I have voted for all of the PDF changes. My problem still stand...Thanks Azwandi, I have voted for all of the PDF changes.
My problem still stands that I don't know how to add the Space name in the header, like it was in version 2.10 or how to add the date it was printed. We typically export 1 page and do it from the page instead of the full PDF export due to the volume of pages we have. No one is allowed to modify the CSS files so it's hard to figure out what is going on.
It seems that there are a lot of people that don't know how to use the new PDF export feature and who are waiting for the requests to be completed. In the interim is it possible to post a quick how to guide for common fields? Things that people are requesting link: Page name, Space name, Path to page, date, time, page numbers, logo, etc... It's frustrating for such a drastic change to be made without having instructions on how to use the new feature.
Any help would be much appreciated.
Jul 03, 2009
Anonymous says:
Hello, today I tried to change PDF-Export Header to show an image in the header...Hello,
today I tried to change PDF-Export Header to show an image in the header.
I wrote:
<div style="margin-top:10mm"> <img src="file:///C:/Programme/confluence-3.0/confluence/WEB-INF/classes/com/atlassian/confluence/importexport/Pantone2_lang.png" width="1500" /> </div>The Image is still in the unexpected size.
What can i do to enlarge the image in the header section?
Regards
Mathias
Jul 05, 2009
Hugo Lassiège says:
Hi, Is there any way to add the title page in the PDF ? I would like to add the...Hi,
Is there any way to add the title page in the PDF ?
I would like to add the title of the current page in the "PDF Export Title Page" section.
(maybe the document title does have sense only for single page export ?)
I looked at the standard css (http://confluence.atlassian.com/download/attachments/190480945/confluencedefaultpdf.css?version=1&modificationDate=1243580667083) and I found that :
div.titlepage,div.toc { page:title; }By the way, I didn't find any reference to page attribute in w3c reference (http://www.w3schools.com/CSS/CSS_reference.asp). I guessed it's an atlassian addon ?
However it didn't work for me if it should display the page title.
Jul 15, 2009
Hugo Lassiège says:
The multiple page export is interessting, but there is a limitation as it is not...The multiple page export is interessting, but there is a limitation as it is not possible to have several documentations with the same structure in the same space.
I tried to import several of our documentation in one space, however if all your documentation have a chapter : Introduction (or whatever you want), the page name is unique in a space so you will have to delete or rename the page.
So I choosed to use the single page import and the single page PDF export.
I've succeeded to have a single page export quite good for our purpose with :
- a table of content (not the true table of content, but the rendering of toc macro)
- a header with page number and our corporate styling
- auto numbering in front of each section (h1, h2 etc...)
If I would like to share some of those settings, what is the best place to write it ? (confluence forum, this thread etc... ?)
Jul 15, 2009
Corey Hampton says:
Hugo, I would like to see how you did the auto numbering and corporate header, ...Hugo,
I would like to see how you did the auto numbering and corporate header, so if you could include the code here it would be great. Do you also know how to add a page name to the export?
Thanks!
Jul 16, 2009
Hugo Lassiège says:
For the header, it's just a CSS style In "PDF Space Export Header (HTML)" : ...For the header, it's just a CSS style
In "PDF Space Export Header (HTML)" :
and in the CSS stylesheet :
#pageNum:before { border: 1px solid #CDC9C6; background-color: #CDC9C6; content: counter(page); color: white; text-align:right; margin-left: 5pt; margin-left: 5pt; padding-left : 5pt; padding-right : 5pt; text-align:center; } .pageheader { border: 1px solid #B792A4; background-color: #B792A4; color: white; text-align:right; margin-right: 0pt; padding-right : 0pt; font-size:11px; }that way it just gives a little header with the company name and the page numbering.
For section numbering I've added the following in the CSS stylesheet (it's just an extract of my own stylesheet, hope it will works for you) :
.wiki-content h1 { counter-reset: sectionh2 sectionh3 sectionh4 sectionh5 sectionh6 ; font-size : 20pt; text-align:center; border-top-color: B792A4; border-right-color-value: B792A4; border-bottom-color: B792A4; border-left-color-value: B792A4; border-left-color-ltr-source: physical; border-left-color-rtl-source: physical; border-right-color-ltr-source: physical; border-right-color-rtl-source: physical; border-top-style: solid; border-right-style-value: solid; border-bottom-style: solid; border-left-style-value: solid; border-left-style-ltr-source: physical; border-left-style-rtl-source: physical; border-right-style-ltr-source: physical; border-right-style-rtl-source: physical; border-top-width: 0pt; border-right-width-value: 0pt; border-bottom-width: 3px; border-left-width-value: 0pt; border-left-width-ltr-source: physical; border-left-width-rtl-source: physical; border-right-width-ltr-source: physical; border-right-width-rtl-source: physical; margin-right: 0pt; margin-top : 300pt; margin-bottom: 0pt; margin-left: 0pt; padding-left: 0em; text-transform: uppercase; } .wiki-content h2 { font-size : 14pt; counter-reset: sectionh3 sectionh4 sectionh5 sectionh6 ; page-break-before: always; } .wiki-content h3 { font-size : 10pt; text-decoration: underline ; counter-reset: sectionh4 sectionh5 sectionh6 ; } .wiki-content h4, .wiki-content h5, .wiki-content h6 { font-size : 8pt; text-decoration: underline ; text-indent: 10px; } .wiki-content h4 { counter-reset: sectionh5 sectionh6 ; } .wiki-content h5 { counter-reset: sectionh6 ; } .wiki-content h1:before { counter-increment: sectionh1; } .wiki-content h2:before { content: counter(sectionh2) " "; counter-increment: sectionh2; } .wiki-content h3:before { content: counter(sectionh2) "." counter(sectionh3) " "; counter-increment: sectionh3; } .wiki-content h4:before { content: counter(sectionh2) "." counter(sectionh3) "." counter(sectionh4) " "; counter-increment: sectionh4; } .wiki-content h5:before { content: counter(sectionh2) "." counter(sectionh3) "." counter(sectionh4) "." counter(sectionh5) " "; counter-increment: sectionh5; } .wiki-content h6:before { content: counter(sectionh2) "." counter(sectionh3) "." counter(sectionh4) "." counter(sectionh5) "." counter(sectionh6) " "; counter-increment: sectionh6; }Nov 18
Anonymous says:
Hello, Hugo! I am trying to tune auto generation of toc (Conflunce 3.0.xx) I f...Hello, Hugo!
I am trying to tune auto generation of toc (Conflunce 3.0.xx)
I faced a problem - when exporting to PDF a single document from one page, the doc header has h1. style, but the page internals starts from h4.
User Manual
Introduction
Because of this problem I am getting the following auto numeration:
1 User Manual
0.0.0.1 Chapter 1 Introduction
But actually the exported page has the same structure:
Jul 30, 2009
Ryan Ackley says:
Here is a link to the appropriate standard http://www.w3.org/TR/css3-page/Here is a link to the appropriate standard
http://www.w3.org/TR/css3-page/
Jul 22, 2009
Anonymous says:
Is it possible to view the intermediatary HTML that is used to generate the PDF'...Is it possible to view the intermediatary HTML that is used to generate the PDF's? It is hard to understand the CSS tags without refering to the HTML that is generated.
It is frustrating that the (former) ability to customize the single page PDF export has been overlooked / removed from 3.0...
Aug 03, 2009
Anonymous says:
I desperately need a way to pull the space name onto the cover page when exporti...I desperately need a way to pull the space name onto the cover page when exporting an entire space to a PDF. Has anyone figured out a way to do this yet? We use Confluence for our client documentation with each client having it's own space. This brings me to my second question - is there a way to apply a global style sheet? If not I'm faced with manually creating 60+ style sheets which doesn't feel like an efficient use of my time.
Aug 04, 2009
Azwandi Mohd Aris [Atlassian] says:
Hi, There are some limitations exposed by the new PDF export, hence, the follow...Hi,
There are some limitations exposed by the new PDF export, hence, the following feature requests might be helpful:
Feel free to add your comments, cast your vote and 'watch' those requests to be notified on future updates.
Hope that helps,
Azwan
Aug 04, 2009
Hugo Lassiège says:
@anonymous1 : you can export the space in HTML (same location as for PDF export)...@anonymous1 : you can export the space in HTML (same location as for PDF export). In theory this HTML is used to generate the PDF.
@anonymous2 : as a workaround I suggest you to make a selenium script
Aug 06, 2009
Anonymous says:
Hi, My company uses confluence 3.0. I need to add the title of a parent wiki pag...Hi,
My company uses confluence 3.0.
I need to add the title of a parent wiki page in each PDF pages.
I tried to modify my PDF stylesheet to do this, to no avail.
Do you have a solution for this?
Thank You,
Aurélien
Aug 11
Sashidaran Jayaraman [Atlassian] says:
Hi Aurélien, I have tried to accomplish this too in my instance and I am not ab...Hi Aurélien,
I have tried to accomplish this too in my instance and I am not able to achieve it. However, I have found an improvement request that is related to this issue. I have voted myself for this improvement request. Please add yourself as a watcher, vote for this feature and add your own comments to this feature request. For further details on how we include new features and improvements, you might want to read this page
Cheers
JSashi
Sep 15
Anonymous says:
Is there a simple way to turn off the section numbering in the export? We ...Is there a simple way to turn off the section numbering in the export? We have some topics with numbers and some without. The PDF export works well as is - except the number in the TOC. Any chance there is an example out there for modifying the PDF export CSS to turn off the number?
Thanks
Sep 17
Oliver Junker says:
Unfortunately, this is a really lousy documentation. We need to have our c...Unfortunately, this is a really lousy documentation. We need to have our coporate logo on space exports, but neither way i tried from the documentation succeeds
. How can we manage to have our logo in the upper right corner, at a certain size, and with certain margins to the top and right side? I'd really appreciate some sample code here :-(
Sep 17
Giles Gaskell [Atlassian Technical Writer] says:
Hello Oliver, Thank you for your feedback on the documentation. Have you seen t...Hello Oliver,
Thank you for your feedback on the documentation. Have you seen the Advanced PDF Stylesheet Customisations page which was published recently? Perhaps the Adding Images to Headers and Footers section on that page might be helpful to you.
If none of the information these pages help, then I'd be really grateful if you could be more specific about your requirements to help us improve our documentation in line with the requirements of our customers.
All of the examples on this and the Advanced PDF Stylesheet Customisations pages have been tested to work successfully in accordance with our documentation. If you find it does not, then please raise a support request.
Also bear in mind that the purpose of this documentation is to provide guidelines on how best to use the PDF export functions in Confluence, along with typical/popular CSS and XHTML examples of PDF customisations. It is not meant to be an in-depth tutorial on CSS.
The W3C CSS3 Module on Paged Media provides information on additional CSS rules that you could use in your PDF stylesheets.
Regards,
Giles Gaskell
Technical Writer
ggaskell@atlassian.com
ATLASSIAN - http://www.atlassian.com
Sep 18
Corey Hampton says:
Giles, I've been having the same type of problems as Oliver. Although the...Giles,
I've been having the same type of problems as Oliver. Although there is documentation it could be enhanced by adding more examples.
Example: On the Advanced instructions for a header the example looks like this. Where is says content: "Document Title Goes Here" it would help to know how to get the page title to go there. This example looks like I would need to go into the stylesheet and change the document time before I did an export. Where are the instructions on how to get the page title to be exported?
I have also been trying to figure out how to get the date to print, and the path to the page, or the space name where the page resides. There are many basic items that I would like to have generated on my exports but there are not specific instructions.
The PDF change implemented in 3.0 was a big change and it didn't follow the other Confluence global settings. There are global settings that are then able to be customized further at the space level. I expected the PDF export to be the same, but it wasn't. So when we upgraded I had to go through 50+ spaces to set the PDF export, which were all the same. This was very time consuming because there wasn't a global setting. I would have expected more examples and more detailed instructions for getting pages to export as desired.
In closing, it would be extremly helpful if you could include more 'real' examples or instructions. The W3C CSS information doesn't help when you want to know how to get a Confluence specific field, like Space Name, on your exports.
Thank you - Coreywindow.SyntaxHighlighter.config.clipboardSwf = '/s/1633/13/2/_/download/resources/com.atlassian.confluence.ext.newcode-macro-plugin:clipboard/clipboard.swf';01.@page02./* Any page-specific properties */03.{04. @top-center05.
10. @bottom-center11.
16. /* Any other page-specific rules */
Oct 21
Dermot O'Halloran says:
Hi all, Is it possible to control the column width of what seem to be "grid" ta...Hi all,
Is it possible to control the column width of what seem to be "grid" tables (i.e. imported or autogenerated tables). For example, my Confluence page imports an external JIRA table using the following macro:
{jiraissues:url=http://jira.atlassian.com/sr/jira.issueviews:searchrequest-xml/14813/SearchRequest-14813.xml?tempMax=1000\|key;summary;description;fixVersion\|}However, when I export this to PDF format using the new PDF export stylesheet the table content overflows the PDF page. I want to be able to reduce the width of a table to say 75% for example or control column widths and how the content in a column is wrapped.
I can reduce the width of a standard table when rendered in PDF using the ".wiki-content .confluenceTable, .grid" CSS selector in the PDF Export Stylesheet section. However, this selector does not seem to work for ".grid" tables.
Can anyone explain how to control these so-called grid tables?
Rgds, Dermot
Oct 26
Kees Leune says:
Another PDF export question: When using generating PDF based on a custom stylesh...Another PDF export question: When using generating PDF based on a custom stylesheet, the index is always off by one. For example, the table of content refers me to page 12, while the actual text starts on page 13. This is undoubtedly caused by me forcing a page break before every h2, but it makes for a sloppy document. Is there a way to correct this?
@page { margin-top: 0.75"; margin-bottom: 0.75"; margin-left: 0.5"; margin-right: 0.5"; font-family: Calibri, Arial, Times; font-size: 11pt; } .wiki-content h2 { page-break-before: always; } #pageNum:before { border-top: 1px solid black; font-size: 8pt; content: "page " counter(page) " of " counter(pages); }Nov 26
Ryan Ackley says:
Kees, this sounds like a bug. Can you file an issue in http://jira.atlassian.com...Kees, this sounds like a bug. Can you file an issue in http://jira.atlassian.com that details how to reproduce the problem.
Nov 01
Anonymous says:
I too am having a fun time trying to guess what HTML is being generated when exp...I too am having a fun time trying to guess what HTML is being generated when exporting to PDF.
Assume the following style:
.pagetitle{border:2px solid green;}This renders a 2px green border around the entire page contents, not the page title.
Dec 03
Thomas Ho says:
Hi, I am trying to do export pages within a space. Is there anyway I can...Hi,
I am trying to do export pages within a space. Is there anyway I can include the page title as the header in the pdf header on a page by page basis, and page specific information in the pdf?
E.g. I am exporting the spaces "Archiving Mail Overview". Is it possible to add "Importing mail", "Deleting mail", "Fetching mail" as title to the top of the header when those pages are converted in PDF?
The old version 2.10.2 supports these by allowing me to modify the velocity templates file.
I did this with common_header_fop.vm in the old version.
<fo:table-row>
<fo:table-cell color="grey">
<fo:block>$pageTitle</fo:block>
</fo:table-cell>
</fo:table-row>
I find the following in the sample css file:
pagetitle
{
page-break-before: always;
}
pagename
{
margin-top: 0;
}
And can I also include the last modified person and the version in the header?
That's how I did it in the old version by modifying the Space.pdfexport.vm
<fo:block color="grey" font-size="8pt" space-after.optimum="12pt">
This page last changed on $dateFormatter.format($page.lastModificationDate) by <fo:inline color="#0050B2">$!page.lastModifierName</fo:inline>.
</fo:block>
and it would print:
This page last changed on December 2, 2009 by Joe
Thanks,
Thomas.
Feb 05
Andrew Glancy says:
PDF Export TOC Inquiry How do I put the table of contents on the second page for...PDF Export TOC Inquiry
How do I put the table of contents on the second page for the PDF export using the div.toc macro. Is this possible? Right now, when we don't set the div.toc macro to 'display: none;' the TOC is crowding into our titlepage and pushing our h1. onto the second page!
What is the proper way to do this?
PDF Export Pagination Inquiry
How do we suppress the page numbers on our PDF export titlepage? We would like to have the page numbering, which we have generated using the following macro:
@page
{
@bottom-right
/* Any other page-specific rules */
}
about 9 hours ago
John Amabilino says:
Is there a way of integrating the export details of a pdf somewhere in the expor...Is there a way of integrating the export details of a pdf somewhere in the exported document? In other words, I wish to include details such as Exported by [username] on [date] from [name of space].
Thanks
Add Comment