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

Confluence PDF export with watermark

G2G JPSupport May 15, 2013

Does anyone know how to add the 'watermark' when user exports Confluence page as PDF?

Any suggestion/advice are appreciated.

Regards,

Chihara

3 answers

1 accepted

1 vote
Answer accepted
G2G JPSupport May 20, 2013

Many try&error, finally PDF Export prints out the page content with watermark as expected.

Addition to force to transparent attribute on Foreground, I set "!important" to "backgroup-image".

So

body{
color:rgba(ff,ff,ff,0.4);
background-color: transparent!important;
}

@page {
background-image: url("http://192.168.11.19:8090/confluence/download/attachments/753666/molumen_world_map.png")!important;
background-repeat: no-repeat;
background-position: center;

Because I'm not familar with CSS, these code are "strange" to people.

Please any advice if you have any idea.

Thank you in advance,

Chihara

Joyce November 14, 2018

@G2G JPSupport Thanks for the code! It works in Confluence v6.5.1 perfectly,

1 vote
C_ Faysal
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.
May 15, 2013

Hi.

please have a look at this page:

https://confluence.atlassian.com/display/DOC/Customising+Exports+to+PDF

also this one explains how & where:

https://confluence.atlassian.com/display/DOC/Providing+PDF+Versions+of+your+Technical+Documentation#ProvidingPDFVersionsofyourTechnicalDocumentation-CustomisingthePDFlayoutandstyle

there is a part "Adding a New Title Page" showing some code to include in pdf export template...this can be used to include custom images as well.

Adding an Image to your Title Page

In the examples above, the title page includes an image called 'titlepage.png', centred in the middle of the page. The image is attached to a Confluence page and is referenced via its relative URL (that is, we use only the last part of the URL, excluding the Confluence site's base URL).

Follow these instructions to include an image on your title page:

  1. Attach the image to a Confluence page.
  2. View the list of attachments on that page.
  3. Right-click the image and copy its location.
  4. Paste the link into the appropriate src="" attribute within your PDF stylesheet, as shown above.
  5. Remove the first part of the URL before /download/....

good luck

0 votes
Chihara
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.
May 19, 2013

Thank you very much for your kindness.
Using Confluence 5.0.2 & 5.1, not succeeded.

In PDF-Stylesheet, my code are :
{noformat}
@page {
background-image: url("http://Confluecne Server URL/confluence/download/attachments/753668/watermark.png");
background-repeat: no-repeat;
background-position: center;
}
{noformat}

When exporting some pages, "watermark.png" is overlaid with page content. So I can't see all of "watermark.png".

Any idea?

Regards.

Chihara

Linda Chong June 26, 2018

I am having the same issue. Are there updates on this? I need this to work so that I can use the PDF documents for client engagement. Otherwise, I need to prepare a separate Word document to send it to the client. It is not productive having to maintain two document sources.  

Chihara
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.
August 7, 2018

Hi Linda,

Please see my update on May 20 2013.

@page {
background-image: url("http://192.168.11.19:8090/confluence/download/attachments/753666/molumen_world_map.png")!important;
background-repeat: no-repeat;
background-position: center;

}

Thanks,

Chihara
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.
August 7, 2018

Confluence 6.10.0, above code is not functioned.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events