"PDF generation failed. Check the page markup is valid" is thrown in Visualforce pages rendered as PDF if they use static resources
Trailblazer Community

"PDF generation failed. Check the page markup is valid" is thrown in Visualforce pages rendered as PDF if they use static resources

VisualForce , Summer 12

Last updated 2015-06-04 ·Reference W-1268476 ·Reported By 6 users

Fixed - Summer '12 Patch 6.0

Summary
In Summer '12 sandboxes, Visualforce pages rendered as PDF and containing references to static resources are throwing "PDF generation failed. Check the page markup is valid." when viewed.

Repro
Create a static resource called testImage that contains an image and then a VF page with the below markup.

<apex:page renderAs="PDF">
<apex:image url="{!$Resource.testImage}"/> <br/>
</apex:page>

When going to /apex/<page-name>, "PDF generation failed. Check the page markup is valid." is thrown instead of the PDF representation of the page.

Workaround
None at the moment.

Updates
15th May 2012
###########

This error message is also thrown in these other scenarios that will also be addressed by the fix:

a) The image points to a relative URL:

<apex:page renderAs="PDF">
<apex:image url="/sfc/servlet.shepherd/version/download/068P00000001234567?asPdf=false"/> <br/>
</apex:page>

b) The page contains a form:

<apex:page standardController="Account" renderAs="PDF">
<apex:form >
</apex:form>
</apex:page>

Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.