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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

PDF layout in one page

Hi,

I know that it's imposible in Confluence to customize the PDF layout when export one page to PDF from the view of page (Tools -> Export PDF), but I want to ask:

It is posible to edit the PDF global layout (even if it means changing aply to all spaces of my system) to put an image of my company logo? I wonder if there is any way possible to do this, even if it means making internal or global changes ...


Thanks in advance!

1 answer

1 accepted

You can include an image in single page exports using custom PDF stylesheets. This example would insert the image (attached to your Confluence instance) in the top right corner of yoru page:

@page
{
    @top-center
    {
        background-image:url('/download/attachments/12345/image.jpeg');
        background-repeat:no-repeat;
        background-position:right top;
     }
}

Thanks Alex!

I don't know that in stylesheet I can import a image... :( i'm newbie in CSS!

@Alex:

Sorry, but this does not work for me. I am not able to place an image to a single page PDF export. Neither if I add the lines to the space PDF Stylesheet nor to the Global PDF Stylesheet. Where am I going wrong? The URL is correct because I can show the image in the browser.

Hi Bruce.

I have tested the CSS and I can confirm they work.

Are you using the PDF conferter bundled with Confluence? Note that the image should only be visible in your page exports and not whe you see the page in your browser.

@Alex:

I just tried in our test system and if I only add the image it will be displayed. So I will go through my CSS to see if I find any problematic entries. Thanks again for testing.

@Alex:

Thanks for testing, yes we use the PDF Eport functionality within Confluence (4.3.2) and I am aware that the logo only shows up in the PDF. For the pages we use the space logo. But perhaps I have problem inside my CSS. I will delete all other entries and just try the one and see where it will get me. I will keep you updated.

@Alex:

Some more news on this. I originally intended to have something like this

@page 
{
    size: 210mm 297mm;   
    margin-top: 2.0cm;
    margin-bottom:1.4cm; 
    margin-left: 1cm;
    margin-right: 1cm;
    padding: 1em;
    
    @top-left
    {
        background-image:url('/download/attachments/5342557/image.jpg');
        background-repeat:no-repeat;
        background-position:center;  
    }
    
    @top-center
    {
        content: "JUST PUT SOME TEXT HERE";        
        font-family: ConfluenceInstalledFont, Helvetica, Arial, sans-serif;          
        font-size: 6pt;     
    }

    @bottom-left  
    {
       margin-left:0.5cm;
       content: "JUST PUT SOME TEXT HERE";  
       font-family: ConfluenceInstalledFont, Helvetica, Arial, sans-serif;         
       font-size: 6pt;   
       vertical-align:top;
    }

    @bottom-right
    {
        content: counter(page) " / " counter(pages);  
        font-family: ConfluenceInstalledFont, Helvetica, Arial, sans-serif;        
        font-size: 6pt;  
        vertical-align:top;
        text-align:right;
    }
}

This does not work as the text seems to hide the image. I found a workaround for now by adding the image part into the "center section" infront of the text. So now I have both text and image. This leads to my next question, is there any way to have a watermark behind the text? Or must I use something like Scroll PDF to achieve this?

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Confluence Cloud

Please tell us how you use Confluence space settings

👋 Hi there, a few of us at Atlassian would love to learn about how you use "space settings" functionality in Confluence. A facelift to the space settings is long overdue and we want to start with im...

126 views 5 6
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you