1

When I upgraded my org to Salesforce summer 14 pre-release (Managed Package), all my static resources keep breaking when rendering as pdf (It works absolutely fine in HTML). I have also added the namespace but it still keeps breaking ! This org works fine in spring and does not break any image. Is there any way of fixing this issue ? is this a salesforce summer pre-release bug ?

I created this dummy page for further tests, it displays .gif images without breaking but all .png images are broken when rendering as pdf.

<apex:page showheader="true" sidebar="true" id="pg" renderAs="pdf">
<img src="/img/abc.gif"/>
<img src="/img/abc.png"/>
<apex:image url="{!URLFOR($Resource.A__abc.png)}" width="32" height="32"/>
</apex:page>

Is there any way to fix this issue? Thanks in advance !

1

This issue is fixed now!

I first tried without giving the extension, then I tried by giving the extension but it didn't work for both.

I submitted a case with salesforce for this issue, so now it works fine and works when you reference the image without giving the extension.

apex:image url="{!URLFOR($Resource.A__abc)}" width="32" height="32"/> can also use 'value' instead 'url'

  • when using img src outside a apex tag (refer 2nd and 3rd lines of the code provided), gif images are still displayed but png images break.
0

There are no "bugs" in pre-release. When you signed up for the org, you acknowledged that some features will not work perfectly because the release is not finalized.

Therefore, there is no way to "fix" it because technically, it is not broken.

(Sorry - I wish I had a better answer, but that's the legalese thing for you.)

  • Also, I don't think I've ever seen that way of referencing an image static resource. I don't think you need the .png on the resource name, nor in the reference. – DavidSchach Jun 18 '14 at 18:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.