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.
@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;
}
}
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:
Hello @R. Fuerst,
I tried your code, where image and heading itself doesn't appear. :(
Thanks & Regards,
Shruthi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.