You need to sign in to do that
Don't have an account?
James 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>
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>
Hope your query is answered below.
https://salesforce.stackexchange.com/questions/377797/render-as-pdf-page-orientation
Thanks,