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

Issue with repeat tag while rendering as pdf

Hi Everyone,


I am having a strange problem while rendering a page as pdf.


Please help guys!



Problem :

I am trying to use apex:repeat for iterating over a List<List<Sobject>>. my VF page as html renders well.

But when I try to render it as pdf ,it gives me a blank pdf.


My Code :

<apex:Page .... renderas="pdf">

 <apex:repeat value="{!ListListOFSOBJECT}" var="list" id="theRepeat">

    <table >

          <apex:repeat value="{!list}" var="item">





This is resulting into blank pdf.

As a workaround i tried to pass the list <apexclassX> to repeat tag

where class X {




But this approach also resulted in a blank pdf.


Please Help!



Any Idea on this?


I'm also encountering this issue. Did you ever find a workaround?


I have found that the pdf page will not gather the data.  The data needs to be in the list before calling the page.  Therefore you need to call a page that will show the data and have a button on the page that calls a method that calls your pdf page. The data will already be in the list so it will show in the page.