function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Austin HorrocksAustin Horrocks 

Render PDF as a custom page size?

I would like to render pdf as a particular page size (example: 4" x 6").  Not sure on how to code this
Anirudh Peri 12Anirudh Peri 12
This is for 8.5"x11" : @page{ margin-top: 60px; margin-left: 10px; margin-right: .5in; margin-bottom: .75in; }
Austin HorrocksAustin Horrocks
Can you clarify this?  I do not want an 8.5 x 11 page.  I would like to change the dimensions
Ajay K DubediAjay K Dubedi
Hi Austin,

There are lot of ways o display records with Height and width:-

1) <Div/> Tag

<div style="background-color:orange;height:125px;width:75px;">
This is how u do it...!
</div>

2)<Table/>

<TABLE BORDER>
<TR> <TD WIDTH=100 >Tsdk</TD> <TD WIDTH=400>dfdf</TD> </TR>
<TR> <TD>df</TD> <TD>df</TD> </TR>
<TR> <TD>dfd</TD> <TD>dfd</TD> </TR>
</TABLE>


3)Would be to create a CSS file and than use the details made there in blocks were you need them

Div and table can be used quiet easily in a Visual Force page..

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks,
Ajay Dubedi