You need to sign in to do that
Don't have an account?
maddukuri
Static resource that has multiple pages
Hi,
I have a static resource that has multiple pages and when I reference it in the page using,
<apex:imageurl="{!$Resource.GPONovationRMW60}"width="100%"height="900px"/>
only the first page is displayed. The 2nd page in the static resource doesn't show up. Can we render fully, the static
resources that has multiple pages? Any input is appreciated.
Thank You!
The tiff gets rendered in the VF page if it is a single page. So, broke the multi page tiff into single pages and included them separately in the VF page. Thanks much for your time though!
All Answers
Is this resource a zip file, or is it simply an image as you are using it?
It is simply an image. It is of type image/tiff.
Is it maybe because you have limited the height of the image to 900px?
Tried increasing/decreasing the height and width, but didn't work.
If you open the file locally in your browser, does it display mutiple pages?
In otherwords, is the issue that the browser won't render mutiple pages? This is opposed to say salesforce not serving up the mutiple pages.
I can view all the pages when I view the file(static resource) in my browser.
Sorry but i just realized that a direct open wasn't a fair test. Please make an Html file in the same dir on your hard drive as the tiff image. In that file, mimic your vf code in html by using the code kind of like this (but matching your VF settings):
Now does the tiff render all pages? If so the issue is with VF. If not, the issue is with the browser. If it is a browser issue, perhaps an Iframe would work?
The tiff doesn't render at all when I put in the html file. I am not sure if changing it to gif/jpeg makes a difference. But will try.
I did some research for you and found this link, which indicates that most browsers can't/won't render a tiff image.
The issue is with the browser, not visual force.
The tiff gets rendered in the VF page if it is a single page. So, broke the multi page tiff into single pages and included them separately in the VF page. Thanks much for your time though!
Anytime. Glad you got it working!