Discussions
- General Development
- Schema Development
- Apex Code Development
- Visualforce Development
- Formulas & Validation Rules
- Security
- Mobile
- Force.com Sites & Site.com
- Chatter Development
- Java Development
- .NET Development
- Perl, PHP, Python & Ruby
- Desktop Integration
- APIs and Integrations
- Visual Workflow
- Apple, Mac and OS X
- VB and Office Development
- AppExchange Directory & Packaging
- Salesforce Labs & Open Source Projects
- Other Salesforce Applications
- Jobs Board
- Force.com Discussion Boards
- :
- Developer Boards for Force.com and Database.com
- :
- Visualforce Development
- :
- Render PDF as landscape issue ??
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Render PDF as landscape issue ??
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
08-18-2009 05:26 AM
Hi
I tried to make the visualforce page renderas PDF in landscape with following styles
<style >
@page {
size:landscape;
}
</style>
But it is not working now. Is anybody face the same issue? or have any idea to render the PDF as landscape??
Thanks!
Solved! Go to Solution.
Re: Render PDF as landscape issue ??
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
08-18-2009 03:55 PM
The pdf renderer has some limitations, maybe this is one of them.
The usage of a specific size in the @page-elements works for me, e.g.:
@page { size: 29.7cm 21.0cm ; margin-top: 1.0cm; margin-left: 1.0cm; margin-right: 1.0cm; margin-bottom: 1.0cm; }
(european standard paper, 1cm border on each side)
hth
Ingo
Re: Render PDF as landscape issue ??
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-29-2009 12:30 AM - edited 09-29-2009 12:31 AM
Following code will work...
<head>
<style>
@page {
size:landscape;
}
</style>
</head>
Re: Render PDF as landscape issue ??
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
01-01-2013 10:05 AM
Neither specifying the size as landscape or as 29.7cm, 21.0cm seams to get the rendering of PDF to actually be landscape mode. Anyone recently able to do this?
Re: Render PDF as landscape issue ??
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-19-2013 11:35 AM
Re: Render PDF as landscape issue ??
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-27-2013 05:28 AM
I had this problem for a while, and then I figured out that the tag <html> which I was usind was creating the problem make sure that there aren't any extra tags.
<apex:page renderAs="PDF">
<head>
<style>
@page{
size: A4 landscape;
}
</style>
</head>
<h1>Testing Landscape</h1>
Rendering PDF as Landscape
</apex:page>

