I have all the pdf files in one folder www.mysite.com/images/ . Is it possible that via some php script whenever user access those pdf files either directly or through google, it is opened inside a frame (with my website's logo, menu etc as the top banner above the pdf) instead of opening directly as pdf file?

Comments

styro’s picture

is a browser plugin thing at the client, the webmaster can't control that. Some PDF readers or OSes don't include browser plugins for PDFs, and always handle PDFs as downloads. Some paranoid users (after all Acrobat Reader has some security issues apparently) might switch off PDF browser plugins.

As for opening in a frame, you couldn't do that with a link directly to the PDF (eg public downloads). With private downloads you might be able to add to the system (?) module to change the download pages to use frames somehow - but IMO it would be a lot of pain for very little (if any) benefit.

--
Anton
New to Drupal? | Forum posting tips | Troubleshooting FAQ

steve22’s picture

anton ..thanks a lot for your suggestions!

funkioto’s picture

with a simple iframe like this:

<iframe src="files/document.pdf" width="650" height="700" frameborder="0" scrolling="no"></iframe>

IE handles it by putting the document inside the page however Firefox brings up an open/save document dialogue.
Would be good for me to get Firefox to open it as IE does.

nitincode’s picture

Hi, Thanks for the avobe code. It works fine but i need to open doc on run time. Can anyone suggest me how to view DOC, PDF and Image at runtime

ClubbieTim’s picture

I have a content page that uses an iFrame to encapsulate other applications. One specific application inside the iFrame opens reports as pdf's. When the link is clicked, the report tries to open (a quick blink) and then the save dialog box appears. Is there anyway to allow for the page to appear without the save dialog box?

Thanks,

Tim

nitincode’s picture

Stuck to display doc file with firefox browser, please assist

---