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
PrattyPratty 

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,

Pratty

colemabcolemab

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).

PrattyPratty

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>
               </apex:column>

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

 

I am unable to get all columns.

 

regards,

pratty

colemabcolemab

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">
@page
{
size:8.50in 14.00in;
margin-top: 1.00cm;
margin-bottom: 0.00cm;
}
</style>