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
etoeto 

PDF renderer crashs if an element is rendered outside the page border using css positioning

Seems like the renderer does not really like elements outside their borders ;-)

 

(you can use fixed or absolute positioning)

 

 

This simple code results in an internal server error:

 



<apex:page showHeader="false" renderAs="pdf" >

<div style="position: relative; top: -1cm;">
CRASHED
</div>
</apex:page>


 

While this one works without problems:



<apex:page showHeader="false" renderAs="pdf" >

<br/><br/><br/><br/><br/>

<div style="position: relative; top: -1cm;">
NO CRASH </div>
</apex:page>