Find your content:

Search form

You are here

How to Put Image into PDF

 
Share

I am creating the PDF by using Templates, i want to paste the image In PDF file i am using another server URL, it's working fine for me For Visualforce templates, it's not working for the PDF which was creating by using templates

my code is--

<messaging:attachment renderAs="pdf" filename="{!relatedTo.name}">

<apex:imageurl="http://skin.xxxxxxx.com/skin/frontend/enterprise/xxxxx_2013/images/xxxx-header_logo.png"/><br/>

Hello {!recipient.name},<br/>

when i use above Server URL it is working fine for me for visualforce templates, when i used for PDF creation it is not working.


Attribution to: Sathya

Possible Suggestion/Solution #1

There's a couple of things you can try:

  1. add http://skin.xxxxxxx.com/ as a Remote Site Setting,

  2. use the <img /> tag instead of the <apex:image /> tag,

  3. localize the file into your org using a Static Resource


Attribution to: bigassforce
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/32034

My Block Status

My Block Content