Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

PDF Stylesheet Customization - Generating Bookmarks (page-breaks) for H1 and H2 headings.

Frank Frank July 10, 2012

Hi...

Can someone share with me some confluencedefaultpdf.css customization examples - that demonstrate

the control/generation of PDF bookmarks...

I'd like to generate bookmarks - according to headings h1/h2/h3 - in a manner similar to the TOC (Table of Contents Macro). This seems to me - a very common requirement, referenced many times in documentation/forums - but no example anywhere ?

If found the following online - can someone help - or forward me a link that explores this type of customization.....

Thanks

.pagetitle
{
page-break-before: always;
}

From:

https://confluence.atlassian.com/display/DOC/Advanced+PDF+Export+Customisations#AdvancedPDFExportCustomisations-RelatedTopics

https://confluence.atlassian.com/display/DOC/Customising+Exports+to+PDF#CustomisingExportstoPDF-PageBreaks

See:

https://answers.atlassian.com/questions/30169/confluence-export-to-pdf-generate-bookmark-index

https://answers.atlassian.com/questions/4625/pdf-export-creates-bookmarks-at-end-of-prior-section

3 answers

0 votes
René Lein September 16, 2012

That is exactly what i am looking for, too. Has anybody an answer? Unfortunately pagebreak just isnt enough. I also have found this issue, but nobody seems to care :-/

https://jira.atlassian.com/browse/CONF-9474

0 votes
Frank Frank July 11, 2012

See comments... for link

Question has been answered already:

1) You can insert a user-macro to do this...

## Macro name: pagebreak
## Has body: NO
## Generates: HTML markup
<div id="pagebreak" style="page-break-before:always;"></div>

2) OR You can use CSS - in Confluence>Admin>LookFeel>PDFExportStylesheet

div.pagebreak {page-break-before: always;}

0 votes
Frank Frank July 11, 2012

OK

I'm able to add PageBreaks - now - at any HTML element I want ?

H1, H2... or DIVs of a certain 'class'.... BUT this does not seem to create bookmarks in the generated PDF as I was led to believe my the documentation ?

Any thoughts ?

This has been answered here:

https://answers.atlassian.com/questions/9558/page-breaks-in-pdf-s

1) You can insert a user-macro to do this...

## Macro name: pagebreak
## Has body: NO
## Generates: HTML markup
<div id="pagebreak" style="page-break-before:always;"></div>

2) OR You can use CSS - in Confluence>Admin>LookFeel>PDFExportStylesheet

div.pagebreak {page-break-before: always;}

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events