+ Start a Discussion

Pdf not showing all columns

Hello All,


I have created a PDF page which contains more than 18 columns but it is not displaying all columns

instead of it is displaying first 7 columns. But it's working fine for Xls page,

so could you help me to get through this.


Thanks & Regards,



Is your PDF being generated to a standard 8.5x11 page?   Is the problem that your page isn't wide enough to display these columns?


If so, you should consider using CSS to set the page size as large as you need (could match an actual page size or could be a custom digital size).


Hi colemab,


Yes my PDF beng generated to standard 8.5*11 page. Also here is my code for pdf


<apex:page standardStylesheets="false" sidebar="false" controller="TestPdfController" showHeader="false" renderAs="pdf">

<apex:form >

 <apex:dataTable value="{!projects}" var="Proj" id="projtable"  border="1" >
                  <apex:column >
                      <apex:facet name="header">FirstName</apex:facet>
                         <apex:outputtext value="{!Proj.FirstName}" ></apex:outputText>

...................and so on upto 18 columns.... </apex:page>


I am unable to get all columns.





As I said, I think you need to add some CSS to change the page size to be big enough to containe the columns.


This link has an example of the css but here is the section you need to add / change:


<style type="text/css">
size:8.50in 14.00in;
margin-top: 1.00cm;
margin-bottom: 0.00cm;