0

Hi all,

I need to know this one. I have web application and i need functionality like client have certain pdf file on his/her local system. I want to use html/javascrpit to print these pdf files without opening.
Thanks in advance.

4
Contributors
4
Replies
5
Views
7 Years
Discussion Span
Last Post by vitana
0

You can not and will not be able to open files on the computer of your visitor, this is due to security reasons. Do you know what you could do if you could acces the files on the visitor's computer?

> Read their personal files
> Plant a virus
> Steal their identity
> Take over their computer

However, you can use a form to allow visitors to upload a file (in your case pdf) to the server, and then open that on-server and return the result to the visitor.

You should search the web on how to make a upload form and how to read pdf files (I'd suggest using PHP).

~G

0

You can not and will not be able to open files on the computer of your visitor

Javascript is perfectly capable of opening files on the client side and displaying or printing them on the client side.

0

Javascript is perfectly capable of opening files on the client side and displaying or printing them on the client side.

Within security limits, of course.

0

If you have modified browser security to open local host pdf file then you can load it to iframe and call window.print().
if browser has installed pdf plug-in then everything will work good.
If your browser does not have modified security then you can load pdf file from server only (using some http request). Even if your server is localhost you need use http url instead of os system path to pdf file

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.