• Shaun Emmett 6
  • 0 Points
  • Member since 2020

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 1

I am having issues with the rendering of images in a Visualforce PDF.

ll my product images are stored on a server and are accessible at the URL http://images.metropuzzle.com/IMG2/[PRODUCT CODE]_IMG2_L.jpg
E.g. http://images.metropuzzle.com/IMG2/NPZPD1703_IMG2_L.jpg
When I try to use those URL in <apex:image> it does not render the image in the PDF...

User-added image

As I am trying to track down the issue, I found something very odd.
For this simple test I am using one of my product image, and an image I found online, the URL is http://investor.salesforce.com/files/design/newlogo-company.png -- This URL seems to redirect to the URL http://s1.q4cdn.com/454432842/files/design/newlogo-company.png

I am building the PDF with the Visualforce code below: 
<apex:page renderAs="PDF">
    <div class="productGridContainer">
            <div class="productGridItem">
                    <apex:image value="http://images.metropuzzle.com/IMG2/NPZPD1703_IMG2_L.jpg"/>
                    <apex:image value="http://investor.salesforce.com/files/design/newlogo-company.png"/>
                    <apex:image value="http://s1.q4cdn.com/454432842/files/design/newlogo-company.png"/> 

It does not render my product image, and for the image I found online it only renders the first one, not the second one. But it is the same image!
User-added image

Would someone have any idea why this is not working?

Thanks a lot!