You need to sign in to do that
Don't have an account?

zero margin
Hello Everyone,
I am trying to create pdf file in salesforce. But I have image and need to put this image with zero margin in the left side .
@page {
margin-left: 0cm;
margin-right: 2.54cm;
}
I wrote this css style , it doesn't work.
Thank you .
I am trying to create pdf file in salesforce. But I have image and need to put this image with zero margin in the left side .
@page {
margin-left: 0cm;
margin-right: 2.54cm;
}
I wrote this css style , it doesn't work.
Thank you .
Kindly use the below updated code However you can add your controller.
Output :
-Lokesh
All Answers
Kindly check this link http://www.antennahouse.com/CSSInfo/CSS-Page-Tutorial-en.pdf and get appropriate styling as per your requirement and do let me know if you have any concern.
-Lokesh
I looked this document before your answer. Unfortunately , I couldn't find anything. There is always a margin in pdf.
Yes, I checked . As you see , <p> doesn't have a margin but in the picture , p has a margin. I don't want this margin.
<head>
<style>
@page {
/* Landscape orientation */
/*size:landscape;*/
//margin-top: 100px;
//margin-bottom:80px;
size:portrait;
margin-left: 2.54cm;
margin-right: 2.54cm;
/*margin-top: 2.54cm;*/
margin-top: 3.20cm;
/*margin-bottom: 2.54cm;*/
margin-bottom: 3.00cm;
/* Put page numbers in the top right corner of each
page in the pdf document. */
@bottom-right {
content: "Page " counter(page) " of " counter(pages);
}
@top-center {
content: element(header);
}
@bottom-left {
content: element(footer);
}
}
</style>
</head>
<div class="header">
<apex:image value="{!URLFOR($Resource.newlogo4)}" width="50%" height="50%" />
<br/>
<br/>
</div>
</apex:page>
This is my code.
Kindly use the below updated code However you can add your controller.
Output :
-Lokesh