By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,987 Members | 1,607 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,987 IT Pros & Developers. It's quick & easy.

View PDF

Slaxer13
100+
P: 106
Hi people,
This is my first attempt at javascript so don't mind my lack of knowledge. Can someone tell me how can i, when i click a link or button (whichever is the easiest), be able to see a PDF file in browser without having to download it?

Any info needed just let me know.
Thanks for the help.
Slaxer13
Jun 5 '15 #1

✓ answered by Dormilich

Can someone tell me how can i, when i click a link or button (whichever is the easiest), be able to see a PDF file in browser without having to download it?
you have to download it in any caseĖyou canít see something thatís not there.

other than that (as already mentioned) whether the PDF is shown in the browser or saved to disk, is a browser setting.

Share this Question
Share on Google+
7 Replies


Rabbit
Expert Mod 10K+
P: 12,349
As far as I'm aware, that's a browser setting, not something you can control from javascript.
Jun 5 '15 #2

Dormilich
Expert Mod 5K+
P: 8,639
Can someone tell me how can i, when i click a link or button (whichever is the easiest), be able to see a PDF file in browser without having to download it?
you have to download it in any caseĖyou canít see something thatís not there.

other than that (as already mentioned) whether the PDF is shown in the browser or saved to disk, is a browser setting.
Jun 6 '15 #3

computerfox
100+
P: 278
You can have an embed object or an iframe with the path to the PDF. I don't believe you have to download the PDF as many sites display it in the browser THEN you have the option of saving it. No need for JavaScript, simply embed with a path. The file might be cached, but not downloaded.
Jun 6 '15 #4

Rabbit
Expert Mod 10K+
P: 12,349
Cached means downloaded, but not necessarily saved. If you can see it in your browser, then it's been downloaded. And usually that also means it's saved to the disk in a temporary cache location.

With PDFs and other third party software, whether it is rendered in the browser window or in it's own separate window is a setting in the browser plug in.
Jun 6 '15 #5

Slaxer13
100+
P: 106
So basically in every browser even when i see a pdf online it has been download even if only in a temp right?
Jun 8 '15 #6

Dormilich
Expert Mod 5K+
P: 8,639
thatís correct.
Jun 8 '15 #7

Slaxer13
100+
P: 106
Thank you for all the help ;)
Jun 8 '15 #8

Post your reply

Sign in to post your reply or Sign up for a free account.