Forums

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

Confluence PDF Stylesheet

shruthi sj
Contributor
June 20, 2018

Hello,

I am trying to add a code to customize my pdf page export.

below is the code, but the problem is there is no space after content to start actual page Title.

 

I have attached an attachment please refer the same. 

enphase_conf.png

@page

{


@top-center
{


background-image:url(/download/attachments/255066264/enphase.jpg?api=v2);
background-repeat:no-repeat;
background-position:left;

padding-top: 40px;
display: inline-block;
content: "Ensemble Requirements Document";
white-space: pre;
font-family: ConfluenceInstalledFont, Helvetica, Arial, sans-serif;
font-size: 15pt;


}

@bottom-center
{
content: "Copyright © 2018, Enphase Energy, Inc.
Page" counter(page);
font-family: ConfluenceInstalledFont, Helvetica, Arial, sans-serif;
font-size: 8pt;
}
}

 

 

1 answer

0 votes
R. Fuerst
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 3, 2018

Hi Shruthi, 

The PDF generator creates 3 different rules for the top of the @Bonifacp: @top-left, @top-center, @top-right. If you just want the text to go to the right of the logo, you can use the @top-right rule instead of the @top-center rule. I believe this would move the “Ensemble Requirements Document” text up.

You could then add some bottom padding and change the top padding to allow for more space. An example of what I’m thinking as applied to the code you shared looks like this:

@top-right



background-image:url(/download/attachments/255066264/enphase.jpg?api=v2);

page-break-after:always;

background-repeat:no-repeat;

background-position:left;

 

padding-top: 20px;

padding-bottom:40px;

display: inline-block;

content: "Ensemble Requirements Document";

white-space: pre;

font-family: ConfluenceInstalledFont, Helvetica, Arial, sans-serif;

font-size: 15pt;

 

If this wasn’t what you’re trying to do, it would be great if you could share a mockup or screenshot of how you want the text to look with the image. :)

Additionally, if you haven't seen our advanced documentation on PDF export customization, please see it below: 

shruthi sj
Contributor
July 5, 2018

Hello @R. Fuerst,

 

I tried your code, where image and heading itself doesn't appear. :(

 

Thanks & Regards,

Shruthi

R. Fuerst
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 10, 2018

Hi Shruthi,

 I’m sorry to hear that didn’t work! To be honest, I am still unclear on what exactly you’re trying to achieve. If you could provide some mockups of how you’d like the top should look or describe in a bit more detail what you’re looking for, I can try to provide an alternative.

 As I understand it, currently “Ensemble Requirements Document” is encroaching on the space where the title of the page should be (“Ensemble SRD” in the screenshot). Please let me know if I misunderstood.

Best,
Rachel

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events