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
Zach Gavin DelacroixZach Gavin Delacroix 

Image not Working on PDF rendered page

Hello,

I created visualforce that converts the page to PDF..

I have 2 pages, both are using the Same controller (where my image URL is located) and both have the same code except the second 1 is rendered as PDF. The 1st page serves as a Preview before converting it to PDF format.


The PDF format image shows like this one below.

User-added image

Below is how I call the URL from the Controller (which the same way I call it from the preview and it's working)

I have this one from the Controller : imageURL = '/servlet/servlet.ImageServer?id=01555000000fdlO&oid=00D5500000066Iu&lastMod=1445545410000';

Then I call it from the PDF Rendered VF like this.
 
<table style="border: 1px solid white;" width="100%">
                     <tr>
                        <td style="border-color:white" width="80px" >
                            <apex:image url="{!imageURL}" />
                        </td>
                        <td style="border-color:white; text-align:left;" width="70%">
                            <font face="calibri" color="black" size="10"><h2>Traffic Control Form</h2></font>
                        </td>
                    </tr>
                </table>

Not sure where else to look so I decided to ask.

Thank you!

-Zach

 
Best Answer chosen by Zach Gavin Delacroix
David OvellaDavid Ovella
mine it's working well using
<img src="{!$Resource.NameOfYourImage}">
Set up-->Develop-->Static Resources--->New
then you just call your image with the NameOfYourImage

or try this
<img src="http://www.maker.com.py/uploads/3/9/5/8/39587917/1416944677.png" width="130" height="60"/>

 

All Answers

suresh sanneboina 4suresh sanneboina 4
change the image url

'/servlet/servlet.FileDownload?file=01555000000fdlO&oid=00D5500000066Iu&lastMod=1445545410000';
David OvellaDavid Ovella
mine it's working well using
<img src="{!$Resource.NameOfYourImage}">
Set up-->Develop-->Static Resources--->New
then you just call your image with the NameOfYourImage

or try this
<img src="http://www.maker.com.py/uploads/3/9/5/8/39587917/1416944677.png" width="130" height="60"/>

 
This was selected as the best answer
Zach Gavin DelacroixZach Gavin Delacroix
Thanks @suresh and @David for the answer..

David's approach worked. Thanks a lot :)