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
arun kumar.ax887arun kumar.ax887 

How to set the page size as A5 to the PDF generated using Visualforce Page

Hi,

 

    I have a requirement, where in I need to generate a PDF in A5 size using the Visual Force Page,  could any  one suggest how to set the page size to A5 in Visual Force.

 

 

 

Regards

 

Arun

Pradeep_NavatarPradeep_Navatar

you can set the size in the Visual force page by assigning the page property for a pdf. Find below a sample code :

 

                                              <style>

                                                  @page :first

                                                  { 

                                                                size:landscape;

                                                                margin-top:0%;

                                                                @top-center

                                                                {

                                                                 content: element(header2);

                                                                }

                                                  }

                                                  @page

                                                  {

                                                                size:landscape;

                                                                margin-top:18%;

                                                  }

                                                </style>