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
Shruti NigamShruti Nigam 

how to add gif in pdf in vf page

Hi all,

I need to add gif in the pdf page.
I tried to add but it is not working anyone know what is the issue ?

Thanks in advance
Andy Kallio 13Andy Kallio 13
You can use Static Resources to do this. So, you would upload your images as a zip file to static resources and then you can make reference to them within your vf page...even when rendered as pdf. 
Shruti NigamShruti Nigam
Hi Andy,
I tried but it doesn't work
Here is my tag
<apex:image value="{!URLFOR($Resource.dragdrop, 'dragdrop.gif')}" />

 
Andy Kallio 13Andy Kallio 13
There are a few examples to try in this doc: https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_resources_reference.htm
Deepali KulshresthaDeepali Kulshrestha
Hi Shruti Nigam,
Greetings to you!

Please perform the steps below in order to use the provided gif image in pdf.
1.Go to static resource  and upload a gif image there.
2.used in vpf 
<apex:image url="{!URLFOR($Resource.logoUrl)}"/>
logoUrl:-> name of gif.

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.


Thanks and Regards,
Deepali Kulshrestha
www.kdeepali.com