+ Start a Discussion
prabhat jhaprabhat jha 

Adjusting more columns(like 16) in visualforce page renderAs "pdf"

Hi All,i have a vf page which is renderas pdf ,but while generating pdf,it looses some columns,i tried landscape orientation by which 14 columns are fitted ,Need help to accomodate more columns in pdf,its 
<!-- vf page -->
<apex:page standardController="Order_vod__c" extensions="AGN_OrderController" sidebar="false"  wizard="True" showHeader="false" title="Order PDF" renderAs="pdf" applyBodyTag="false " standardStylesheets="false">
    <!--<style type="text/css">
   .outBorder {
    border:1px outset black;
   }
   .inBorder{
    border-top:1px dotted blue;
    border-left:1px dotted blue;
   }
   .element {
  font-size: 1em;
}
  </style> -->
    <head>
        
    
    <style>
@page {
size: landscape;
        margin: 0.002mm; 
        white-space: normal;
        font-size: 1px;
        

}
</style>
        </head>
  <!--<apex:stylesheet value="{!URLFOR($Resource.testing_css, 'styles.css')}" />-->
    <head>
        
    </head>
    
    <body>
        <h1>
            Hello World
        </h1>
        <apex:dataTable value="{!ORDERSLIST}" var="olist" cellPadding="4" border="1"  >
            
          <apex:column >
               
           <apex:facet name="header">Account Name</apex:facet>
              
                <apex:outputField value="{!olist.Account_vod__r.Name}" />
            </apex:column>
             <apex:column >
                <apex:facet name="header">External ID</apex:facet>
                <apex:outputField value="{!olist.Account_vod__r.External_ID4_AGN__c}" />
            </apex:column>
             <apex:column >
                <apex:facet name="header" >Billing Contact</apex:facet>
                <apex:outputField value="{!olist.Billing_Contact_vod__c}"  />
            </apex:column>
             <apex:column >
                <apex:facet name="header" >Billing Address_</apex:facet>
                <apex:outputField value="{!olist.Billing_Address_Line_1_vod__c}" />
                  <apex:outputField value="{!olist.Billing_Address_Line_2_vod__c}" />
            </apex:column> 
            <apex:column >
                <apex:facet name="header">Ship To Address</apex:facet>
                <apex:outputField value="{!olist.Ship_To_Address_vod__r.Name}" />
            </apex:column>
             <apex:column >
                <apex:facet name="header">Notes</apex:facet>
                <apex:outputField value="{!olist.Notes_vod__c}"/>
            </apex:column>
            <!--  </apex:dataTable>-->
        <br/>
       <!-- <apex:dataTable value="{!ORDERSLIST}" var="olist" cellPadding="4" border="1"  >-->
             <apex:column >
                <apex:facet name="header">Order Date</apex:facet>
                <apex:outputField value="{!olist.Order_Date_vod__c}" />
            </apex:column>
            
             <apex:column >
                <apex:facet name="header">Quantity</apex:facet>
                <apex:outputField value="{!olist.Order_Total_Quantity_vod__c}"/>
            </apex:column>
              <apex:column >
                <apex:facet name="header">List Amount</apex:facet>
                <apex:outputField value="{!olist.Order_List_Amount_vod__c}"/>
            </apex:column>
            
          
              <apex:column >
                <apex:facet name="header">Total Discount</apex:facet>
                <apex:outputField value="{!olist.Order_Total_Discount_vod__c}" />
            </apex:column>
              <apex:column >
                <apex:facet name="header">Net Amount</apex:facet>
                <apex:outputField value="{!olist.Order_Net_Amount_vod__c}" />
            </apex:column>
            
           
             <apex:column >
                <apex:facet name="header">Delivery Date</apex:facet>
                <apex:outputField value="{!olist.Delivery_Date_vod__c}"  />
            </apex:column>
            
               </apex:dataTable>
    
        <br/>
        
        
        <apex:dataTable value="{!ORDERLINES}" var="order" cellPadding="4" border="1">
          
            <apex:column >
                <apex:facet name="header">Product</apex:facet>
                <apex:outputField value="{!order.Product_vod__r.Name}" />
            </apex:column>
            <apex:column >
                <apex:facet name="header">Quantity</apex:facet>
                <apex:outputField value="{!order.Quantity_vod__c}" />
            </apex:column>
             <apex:column >
                <apex:facet name="header">List Price Rule</apex:facet>
                <apex:outputField value="{!order.List_Price_Rule_vod__c}" />
            </apex:column>
             <apex:column >
                <apex:facet name="header">Line Discount</apex:facet>
                <apex:outputField value="{!order.Line_Discount_vod__c}" />
            </apex:column>
             <apex:column >
                <apex:facet name="header">Free Goods</apex:facet>
                <apex:outputField value="{!order.Free_Goods_vod__c}" />
            </apex:column> 
            <apex:column >
                <apex:facet name="header">List Amount</apex:facet>
                <apex:outputField value="{!order.List_Amount_vod__c}" />
            </apex:column>
            <apex:column >
                <apex:facet name="header">Net Price</apex:facet>
                <apex:outputField value="{!order.Net_Price_vod__c}" />
            </apex:column>
             <apex:column >
                <apex:facet name="header">Net Amount</apex:facet>
                <apex:outputField value="{!order.Net_Amount_vod__c}" />
            </apex:column>
          <!--   </apex:dataTable> -->
        <br/>
      <!--   <apex:dataTable value="{!ORDERLINES}" var="order" cellPadding="4" border="1">-->
       <apex:column >
                <apex:facet name="header">Rule</apex:facet>
                <apex:outputField value="{!order.Rule_vod__c}" />
            </apex:column>
             <apex:column >
                <apex:facet name="header">Brand Discount Rule</apex:facet>
                <apex:outputField value="{!order.Brand_Discount_Rule_vod__c}" />
            </apex:column>
              <apex:column >
                <apex:facet name="header">Group Discount Rule</apex:facet>
                <apex:outputField value="{!order.Group_Discount_Rule_vod__c}" />
            </apex:column>
             <apex:column >
                <apex:facet name="header">Free Goods Rule</apex:facet>
                <apex:outputField value="{!order.Free_Goods_Rule_vod__c}" />
            </apex:column>
            <apex:column >
                <apex:facet name="header">List Price (VAT)</apex:facet>
                <apex:outputField value="{!order.KR_List_Price_VAT_AGN__c}" />
            </apex:column>
             <apex:column >
                <apex:facet name="header">Net Amount (VAT)</apex:facet>
                <apex:outputField value="{!order.KR_Net_Amount_VAT_AGN__c}" />
            </apex:column>
             <apex:column >
                <apex:facet name="header">Customer Price</apex:facet>
                <apex:outputField value="{!order.KR_Customer_Price_AGN__c}" />
            </apex:column>
            
        </apex:dataTable>
    </body>    
</apex:page>
 
Controller:
public  class AGN_OrderController
{

    public AGN_OrderController() {

    }

    public string orderrId{get;set;}
    PUBLIC string name{get;set;}
    
    public AGN_OrderController(ApexPages.StandardController stdController){
        orderrId = ApexPages.currentPage().getParameters().get('id');
    }
    
    public  List<Order_vod__c> getORDERSLIST()
    {
        List<Order_vod__c> ORDERSLIST ;
        
        ORDERSLIST = [SELECT Account_vod__r.Name,Account_vod__r.RecordType.name,Account_vod__r.External_ID4_AGN__c,Billing_Contact_vod__c,Billing_Address_Line_1_vod__c,Billing_Address_Line_2_vod__c,Ship_To_Address_vod__r.Name,Notes_vod__c,Order_Date_vod__c,Order_Total_Quantity_vod__c,Order_List_Amount_vod__c,Order_Total_Discount_vod__c,Order_Net_Amount_vod__c,Delivery_Date_vod__c FROM Order_vod__c WHERE Id=: orderrId ];
        List<Order_vod__c> n=[SELECT Notes_vod__c from Order_vod__c];
      
         
        
        system.debug('Order'+ORDERSLIST);
       
        return ORDERSLIST;
       
    }
    
    public  List<Order_Line_vod__c> getORDERLINES()
    {
        List<Order_Line_vod__c> ORDERLINES ;
        
        ORDERLINES= [SELECT Product_vod__r.Name,Quantity_vod__c,List_Price_Rule_vod__c,Line_Discount_vod__c,Free_Goods_vod__c,List_Amount_vod__c,Net_Price_vod__c,Net_Amount_vod__c,Rule_vod__c,Brand_Discount_Rule_vod__c,Group_Discount_Rule_vod__c,Free_Goods_Rule_vod__c,KR_Net_Amount_VAT_AGN__c,KR_Customer_Price_AGN__c,KR_List_Price_VAT_AGN__c FROM Order_Line_vod__c WHERE Order_vod__r.Id=: orderrId];
       
        system.debug('Order Lines'+ORDERLINES);
        
        return ORDERLINES;
        
    }
}

URGENT.
Thanks  in Advance