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
middha.vikram@gmail.commiddha.vikram@gmail.com 

Generate pdf giving heap size error on VF page

Hi,

 

My requirement is to generate a pdf on click of a button. This button makes a web service calls and just displays the result on pdf. I generate this pdf as rendered from VF page. 

 

The problem here is that if the records that are returend from the webservice is < 6000, then it works fine. If the records are > 6000, I am getting VF heap size governor limit error. 

 

We need to email this pdf to the logged in user. 

 

Any thoughts on this ?

 

-Vikram

vijaymindvijaymind

Try to clear all list data your contains execpt which showing on VF page . It might be you extract the records in one list and passing the another list or wrapper class list on visualforce page. So you just need to clear first one after process all the records because VF page heap size calculate all list data contains in apex controller.