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
Salesforce 283Salesforce 283 

How to call PDF file in static resource from Visualforce page

Hi Guys,

I put one pdf file in static resource. So i need to display that file in vf page. 
How can i call pdf file and help me out this problem.



Thanks,
Mahesh.

Vishal Negandhi 16Vishal Negandhi 16
I don't know how exactly you want to refer this PDF. 

But I roughly tried this in my dev instance..
 
​<apex:page controller="DeveloperForumController">
    <script type="text/javascript">
            document.location.href = '/resource/1444911873000/PDF1';
        </script>
</apex:page>

The url given is of a static resource and when I open this page, it shows the pdf file named PDF1 in the browser. 
Salesforce 283Salesforce 283
Hi, I have put one PDF file which has 5 pages in static resource that i want to display 5pages in vf page. I have one more issue, i put one zipfile which has 5 images in static resource. How to display in vf page. Regards, Mahesh.