+ Start a Discussion
SjaleelSjaleel 

Adding an image

Dear Developers,

 

I know my question is silly, but yet I need to ask 'cos I need to learn and I need to know ^__^ and am new to the VF world too!

 

How can  an image, a logo of the company, added to the PDF document that is being generated via visual force? The image is stored into our salesforce communications template.

 

Thanks in advance

Best Answer chosen by Admin (Salesforce Developers) 
kiranmutturukiranmutturu

u have to store the image as a static resource and you can refer that in your vf page like this

 

 

<apex:image id="theImage" value="{!$Resource.myResourceImage}" width="200" height="200"/>

 

All Answers

kiranmutturukiranmutturu

u have to store the image as a static resource and you can refer that in your vf page like this

 

 

<apex:image id="theImage" value="{!$Resource.myResourceImage}" width="200" height="200"/>

 

This was selected as the best answer
SjaleelSjaleel

Thanks for the fast response, but how do I make it static resource?

 

Thanks in advance

kiranmutturukiranmutturu

navigation for to setup -->develop --> static resource then click on new give an appropriate name and choose the file from the local machine and make it as public and save. then u can use with the name what u gave previously. and syntax is stated as before.... 

SjaleelSjaleel

Thanks for the answer...one simpla obstacle got over :D!

 

 

Regards

S.Aj