Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Hiding Page Title from PDF export = do not show it on PDF

Steffen Heller
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 29, 2022

Hello everyone,

hiding the page title seems a rather popular topic. I have already found and read the following threads:

But since none of the threads answers my specifiy question, I would like to open one more.

I am currently using Confluence as Server and version 6.13.23

What I have been thinking and doing so far:

Generally, my approach to adjusting page elements for the Confluence PDF export is always the same:

  1. Find that page element in the HTML source code
  2. Look for an HTML element that has that page element inside
  3. Go to the PDF Export Stylesheet and define some line of CSS code for that HTML element that produces the desired result (in this case: hide the element)

Okay, let's go through these three steps:

1. The result for my "Page title" is this:

<h1 id="title-text" class="with-breadcrumbs">
<a href="/display/teamcs/basicDIM+Wireless+Profiles">Page title</a>
</h1>

 

2. To make sure that I pick some HTML element that works, I use the CSS macro, add it to my wiki page and play around with some snippets like the following:

h1#title-text a {
color: green; /* can be anything that produces some visible result */
}

h1#title-text { background: silver; }
#title-text a { font-size: 80pt; }


When saving the page, the result is as I was hoping for, the page title displays color, background and font-size as defined.

Okay, up until now, I was only checking the look of the wiki page, not the page exported to PDF. But at least, I am pretty sure that the CSS code should work.

 

3. Next step is trying to do the same thing for the PDF export:

For this, I copy my CSS code to the PDF Export Stylesheet and export the page with ... (three dots) > Export to PDF.

The result now, unfortunately, is negative. The way the page title is displayed in the exported PDF is totally untouched from what I tried to achieve with my CSS code.

=> The BIG question:
Why is this so? The CSS code should be working.
What is different when exporting to PDF?
Is there another stylesheet with standard values that can't be overwritten or with definitions that have a higher priority?

Anything else?

PS:

I know that questions like this one are stupidly difficult to answer since Confluence is different between Cloud and Server and from one version to another.

I, for example, know that what I am enquiring about now is something that used to work in earlier versions of Confluence. The code I would use back then was the "h1.pagetitle {...}" which has been mentioned in numerous older threads but is now definitely not part of my source code anymore.

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events