• vikramraj muthayala
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 4
    Replies
Can we count page Number based on <apex:repeat> tag.

Say example visual force generates PDF from list button where 2 records are selected and result page is totally 5.
With help apex repeat tag, for the first record 3 pages and second record it is next 2 pages generated in a single file.
I want count a page number in a PDF doc as Page 1 of 3, 2 0f 3, 3 0f 3 and then again 1 of 2 and 2 of 2.

Is it possible? I am using below code to display page number it is counting from 1 to 5.

how to reset for the second record

<HEAD> <style type="text/css"> @page { @bottom-center{ content: "Page " counter(page) " of " counter(pages); } } } </style> </HEAD>
 
Can we count page Number based on <apex:repeat> tag.

Say example visual force generates PDF from list button where 2 records are selected and result page is totally 5.
With help apex repeat tag, for the first record 3 pages and second record it is next 2 pages generated in a single file.
I want count a page number in a PDF doc as Page 1 of 3, 2 0f 3, 3 0f 3 and then again 1 of 2 and 2 of 2.

Is it possible? I am using below code to display page number it is counting from 1 to 5.

how to reset for the second record

<HEAD> <style type="text/css"> @page { @bottom-center{ content: "Page " counter(page) " of " counter(pages); } } } </style> </HEAD>
 

Can we able to count page Number based on <apex:repeat> tag.
 
Say example, visual force generates PDF from list button where 2 records are selected and click a custom button then as a result PDF generated with totally 5 pages. With help of apex repeat tag, for the first record generates 3 pages and second record generates next 2 pages in a single file.
 
We need to count a page number in a PDF doc as Page 1 of 3, 2 of 3, 3 of 3 and then again 1 of 2 and 2 of 2.
 
Is it possible? Any suggestions are highly appreciated. I am using below code to display page number, it is counting from 1 to 5.

 

<HEAD> <style type="text/css"> @page { @bottom-center{ content: "Page " counter(page) " of " counter(pages); } } } </style> </HEAD>

 

Can we count page Number based on <apex:repeat> tag.

Say example visual force generates PDF from list button where 2 records are selected and result page is totally 5.
With help apex repeat tag, for the first record 3 pages and second record it is next 2 pages generated in a single file.
I want count a page number in a PDF doc as Page 1 of 3, 2 0f 3, 3 0f 3 and then again 1 of 2 and 2 of 2.

Is it possible? I am using below code to display page number it is counting from 1 to 5.

<HEAD> <style type="text/css"> @page { @bottom-center{ content: "Page " counter(page) " of " counter(pages); } } } </style> </HEAD>

 

 
We have a few VF pages rendered as PDF which are using <Apex: dataTable>. This document is genereated in protrait size with 8 columns. It also include Product Name (80 char).
 
I want the text to be wrapped in each column. If I render the page as HTML then it works, but it does not work for PDF. I am even specifying the columnsWidth attribute.
 
 
Code:
<apex:dataTable width="100%" border="0" id="DataTable" value="{!SalesOrderLines}" var="SalesOrderLine" style="font-size:10px;vertical-align:top;word-wrap: break-word;"  headerClass="headerrow" 
   columnsWidth="60,250,90,50,95,100,100,100" rowclasses="odd,even" >


 <apex:column headervalue="Line">
             <apex:outputField value="{!SalesOrderLine.Name}"/>
 </apex:column>   
 <apex:column style="width: 200px;word-wrap:break-word" >
     <apex:facet name="header">
 {!$ObjectType.SalesOrderLine__c.Fields.Product__c.label}                                 
      </apex:facet>
        {!IF(SalesOrderLine.Product__r.name = null,SalesOrderLine.Product__c, SalesOrderLine.Product__r.name)}
 </apex:column> 
.......
</apex:dataTable>

 I have even tried putting following style for <td> in the page
 
Code:
<style type="text/css">
  td {
    word-wrap: break-word;
  }
</style>

 
Does anyone has any idea, what is the best way to achieve word wraping for PDFs. This is very urgent !!!
 

 
 
I also
  • October 26, 2008
  • Like
  • 0