After the upgrade to Confluence 6.6.6 our PDF Layout and Stylesheet stopped working properly.
We have a rather simple Layout, containing images and a page-break:
...
<div class="###"
<img src="/download/attachments/2392322/PW2.png" class="title-image" />
</div>
...
<div class="###" style="page-break-before:always;"></div>
Have also 2 macros defined:
noprint
## @noparams
<div class="noprint">$body</div>
and pagebreak
## @noparams
<div style="page-break-before:always;"></div>
Here's a stylesheet:
.pagetitle h1 {
position: running(runningheader);
font-size: 10pt;
text-decoration: none;
}
.mytoc a:after
{
content: leader(dotted) target-counter(attr(href), page);
}
table
{
page-break-inside:avoid;
}
h1, h2, h3, h4, h5
{
page-break-after:avoid;
}
div
{
display: inline;
}
div.noprint
{
display: none !important;
}
@page
{
size: 215mm 279mm;
margin: 15mm;
@top-left
{
content: "###";
font-size: 10pt;
color: #666666;
}
@top-right
{
content: element(runningheader);
}
@bottom-left
{
content: "###";
font-size: 10pt;
color: #666666;
}
@bottom-center
{
content: counter(page) " / " counter(pages);
font-size: 10pt;
color: #000000
}
@bottom-right
{
content: "Propitiatory and confidential";
font-size: 10pt;
color: #666666;
}
After the upgrade following do not work:
In the end I was not able to find a solution for issues with Confluence built-in PDF export mechanism in later versions (specifically related to images in title page) and ended up switching to https://marketplace.atlassian.com/apps/4909/content-exporter-word-pdf-html?hosting=server&tab=overview
Forgot that space had it's own PDF stylesheet:
.pagetitle h1 {
display: none;
}
@page
{
size: 215mm 279mm;
margin: 15mm;
@bottom-left
{
content: "###";
font-size: 10pt;
color: #666666;
}
@bottom-center
{
content: counter(page) " / " counter(pages);
font-size: 10pt;
color: #000000
}
@bottom-right
{
content: "Proprietary and confidential";
font-size: 10pt;
color: #666666;
}
}
@page title {
@top-left {}
@top-center{}
@top-right {}
@bottom-left {}
@bottom-center{}
@bottom-right {}
}
div.noprint
{
display: none !important;
}
table
{
page-break-inside:avoid;
}
h1, h2, h3, h4, h5
{
page-break-after:avoid;
}
.pagetitle
{
page-break-before: always;
}
/* Turn off the default section numbering for this TOC item */
/* .toclvl0:before { content: " "; counter-reset: chapter 0; } */
/* Hide the default page numbering for this TOC item */
.toclvl0 .tocnum { display: none; }
/* Move and style this TOC item */
.toclvl0 { position:absolute; top:600px; left:-20px; font-size: 32px; text-align:left; }
div.toclvl0:before { content: ""; }
div.toclvl1:before { content: ""; }
div.toclvl2:before { content: ""; }
div.toclvl3:before { content: ""; }
div.toclvl4:before { content: ""; }
div.toclvl5:before { content: ""; }
.title-image
{ -fs-fit-images-to-width: 100% !important; }
After adding noprint CSS into it it fixed the issue that caused no-print messages to still show,
Other issues are still present though - images do not show up, page-break does not work on title page, and now I noticed that first page title still shows up in the document even though .pagetitle should be hidden (did that change)?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.