I would like to customise the PDF Export of a single page in Confluence so it has the following:
A title page containing:
Page Title: "Test Page"
Space Name: "Test Space"
Last Edited by: "John Smith"
Last Edited on: "12th Nov 2011"
Headers that have:
Confidentiality Statement: "This page is the property of Test Company"
Footers that have:
Page Number details: Page 1 of 6
I do not know the correct CSS to get the space name, editor or edit date details.
I am also unsure if there is a way to get the total page number information and how to embed this in the footer.
At the moment, I have a basic version of the above which provides title page with page name and header and footer.
.pagetitle h1 { font-size: 36px !important; margin-left: 250px !important; padding-top: 300px !important; page-break-after:always; } @page /* Any page-specific properties */ { @top-center { content: "Property of Company X Inc."; font-family: ConfluenceInstalledFont, Helvetica, Arial, sans-serif; font-size: 8pt; } @bottom-center { content: "Page " counter(page); font-family: ConfluenceInstalledFont, Helvetica, Arial, sans-serif; font-size: 8pt; } /* Any other page-specific rules */ }
Any help expanding on this with details of the CSS would be great.
I have been reviewing many of the online resources for this and can't find this information.
Community moderators have prevented the ability to post new answers.
Hi Mick,
to include the total page number information just add a little somethig to your code:
content: "Page " counter(page) " of " counter(pages);
Steffen
Thanks Steffen, that's very helpful!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can't get hold of that information using CSS alone as it is merely a method of formatting the existing page content. You'll need to edit the underlying layouts.
Browse to Confluence Admin | Look and Feel | Layouts
Under Export Layouts click on "Create custom" next to Page Export Layout
You'll see that you can access:
This should give you a start for editing the layout.
Use "Confluence Objects Accessible From Velocity" from the documentation as a reference
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks David. I'll take a look - that sounds like what I have been looking for.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
David, I have been playing with this for a little bit and I am not that much further along, however, I would like your opinion on something. It seems that when exporting a single page to PDF through the Tools - Export to PDF option, it is only the PDF Stylesheet which is utilised - the PDF Layout is not.
The PDF Layout only seems to be used when the space export to PDF option is used.
Is that your understanding?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Michael Roff - Correct, PDF layouts only affect space exports, not page exports. This page from Atlassian cofirms that - https://confluence.atlassian.com/doc/customize-exports-to-pdf-190480945.html. I also am looking for a way to add the "date printed" to the bottom of all PDF page exports from our Confluence instance, and I have not yet found a way
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, maybe you want to have a look at our product, the Scroll Wiki PDF Exporter. That makes it is very easy to create custom styled PDF templates for export. Let me know if you need further informatin or any help.
Cheers, Joe
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Joe.
I have already been looking at your plugin. It's pretty much what I want. Now I just need to get a purchase order approved :/
While I have your attention, can you tell me who I should speak to within K15t about your Scroll Forms plugin? I would like to know its capabilities regarding backwards compatibility with scaffolding forms / reporting.
Thanks, Mick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mick,
With Content Exporter for Confluence addon you can create export profiles where you can setup headers and footers:
https://metainf.atlassian.net/wiki/spaces/CEX/pages/71338426/Export+Profiles
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mick,
please contact support[at]k15t.com about your question concerning Scroll Forms.
We keep our fingers crossed that you get the order approved.
Cheers, Joe
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You could likely edit the PDF layout to inject these. See the documentation: http://confluence.atlassian.com/display/DOC/Customising+Exports+to+PDF
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks David.
I have reviewed various online resources which cover CSS and PDF Export from Confluence (including the link supplied) but I am unable to find anywhere that deals with the specific items I would like to implement. Namely, detailed page numbers, contributors and versions / dates.
I am not a CSS expert, so I might be missing something that is obvious for others and if that is the case, would appreciate some direction from those more familiar.
Mick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@David Simpson - The PDF layout customization described here - https://confluence.atlassian.com/doc/customize-exports-to-pdf-190480945.html - does not apply to page exports, only space exports:
- PDF customizations are unique to each space.
- PDF customization only applies to space exports (not single page exports via Tools > Export to PDF)
I have not yet found a solution that allows you to add things like the date to the header or footer for all page exports
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.