You need to sign in to do that
Don't have an account?
Salesforce 283
How to call images in zipfile as a static resource from visualforce pdf
Hi Guys,
I put Zipfile in static resource which named as pdfimages.zip and MIME type showed as image/png. In that so many images and i want to display one by one image in Visualforce PDF pages. Please help me out this problem.
Regards,
Mahesh.
I put Zipfile in static resource which named as pdfimages.zip and MIME type showed as image/png. In that so many images and i want to display one by one image in Visualforce PDF pages. Please help me out this problem.
Regards,
Mahesh.
Try out the below sample code,
If your static resource file contain only single image, then use below one,
Where BGImage is the Static resource name and it contain single image.
If your static resrource contain multiple images, then use below one, Where BGImage is the Static resource name and Bluehills, Work, Nature are the image names.
If your static resrource contain multiple images within a folder, then use below one,
Where BGImage is the Static resource name and images denotes the folder name.
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_resources_reference.htm
I wrote like below in page
<apex:image url="{!URLFOR($Resource.Another_PDF,'images/file-page1.jpg')}"/>
Another_PDF- Static resource name
Images- zipfile name
file-page1- image name in zipfile.
Image shown like below i mentioned.
You can try out by setting height and width for an image.
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_image.htm
can i use variable in directory name like
<apex:image url="{!URLFOR($Resource.im, 'img/{!c.label}.jpg')}" width="50" height="50"></apex:image>
Bcz im.zip file have multiple image file and i want to show image in loop format.
c.label variable have string like image file name