Hi, im building an intranet file viewer and i need to open excel, pdf
etc… in asp page, but it doesnt seem to work, any ideas why any of
this options dont work?
Here’s an easy way for you to tell. Are your PDFs/excel spreadsheets in the same folder as your HTML file?
E.g. lets say your HTML file is this and your PDF is called PDF-file.pdf
file:///C:/Users/rreese/Desktop/asdf.html
That’s just a random HTML page I created and opened in Chrome (or any browser). Copy that URL and then replace asdf.html with whatever your PDF is called. E.g. PDF-file.pdf
Alternatively you could just relatively link it. So if your PDF file is in the same folder as your HTML page, remove hte file:/// and http:// stuff and ONLY put “PDF-file.pdf” in your file name. It’ll look for that file in the same folder as your HTML file.
tried with full path, server.mappath and path from asp page and always get the The address wasn’t understood message, but when i print the path it prints the correct path.
It looks like you have the name wrong. I don’t see any PDF reference in your above code, so can you show us what code is used for the PDF? Along with what the actual file name is in yoru folder?
You’re using HTTP protocol. Use the path accordingly. Those path have to be reached by the IIS server, not by Windows explorer.
HTTP doesn’t understand of units such as C:. They understand things like IP addresses for a server, relative paths and things like that… Try that and let us know how it works
What do you mean with top bar? If the file is open in the browser, you shouldn’t have one. It may be a case of configuration of Adobe Reader, though. It affects on how the PDF is displayed in the browser (that is, if you’re using Adobe Reader’s plugin)
That is part of the PDF reader so you can’t disable it completely unless you have access to the reader plugin on each specific computer where you want to disable it. Then assuming that the plugin has an option for disabling it then you will be able to disable it for all PDFs displaying in that browser on that computer.
I don’t know if there is an option to disable it as I haven’t come across a situation where anyone wants to block their own ability to print, save or zoom PDFs displayed in their browser. Not that doing so would prevent them from being able to open the downloaded copy of the PDF in a stand alone PDF editor or reader and zoom from there.
You can encrypt and then password protect a PDF so that only those who know the password can print it. That will not disable the print button but it will then ask for the password before allowing the file to print. There are programs around that can bypass this so doing so will not prevent everyone from being able to print but it will prevent most.
To the best of my knowledge there is nothing you can do to the PDF itself to prevent the save or zoom options from working.