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
James Hoyles 10James Hoyles 10 

Render as PDF page orientation

Hi All,
I'm trying to have both portrait (page one) and landscape (page two) in a visualforce page which is 'render as PDF'.
I have tried various options but cannot get it to work, I can only get all landscape or all portrait, here is the code, please help!

<apex:page Controller="RAMS_Controller" showHeader="false" renderas="pdf" applyBodyTag="false" applyHtmlTag="false">
       <html>
        <head>
            <style>
                @page{
                    size: A4 landscape;
                }
            </style>
<!-- Page 1 -->
<div style="text-align:center;">
        <p style="text-align:center;font-size: 25px"><font face="Arial">Page One</font></p>
</div>
<!-- Page 2 -->    
<div style="text-align:center;">
    
        <p style="text-align:center;font-size: 25px"><font face="Arial">Page Two</font></p>
</div>
           </head>
    </html>
Best Answer chosen by James Hoyles 10
VinayVinay (Salesforce Developers) 
Hi James,

Hope your query is answered below.

https://salesforce.stackexchange.com/questions/377797/render-as-pdf-page-orientation

Thanks,