I'm building out a Bootstrap website in Salesforce and I now have a requirement to allow the users to download some of the pages as PDFs. Unfortunately, when I use renderAs="PDF"
, I get this error:
Error accessing PDF resource
Resource url = https://cs22.salesforce.com/resource/1430422148000/Bootstrap_3_1_1/bootstrap-3.1.1-dist/css/../fonts/glyphicons-halflings-regular.eot
The resource does exist. I don't use the glyphicons on this page, but I'd hate to remove them from the static resource when I might use them elsewhere. What can I do?
For reference, this line will cause the error (when renderAs="PDF"
):
<apex:stylesheet value="{!URLFOR($Resource.Bootstrap_3_1_1, 'bootstrap-3.1.1-dist/css/bootstrap.min.css')}" />
Update: We ended up dropping PDF support because of the limitations on what Salesforce can turn into a PDF—and look good.
.../resource/1430422148000/...
.$Resource
to link the Bootstrap CSS, and that relatively includes the glyphicons.renderAs="PDF"
. (The PDF rendering of Bootstrap is not surprisingly pretty poor though.) I presume you have double checked that the font files are present at "css/../fonts"?