Saturday 03 July 2010 6:12:16 am
Hey Jordan! I generally have three options for content creators on how they want to handle showing pdf files. One, as you mentioned would be to force a download of the file using the content/download module, the second one is forcing the browser to view the file, rather then forcing the download. I do this by linking directly to the file, however I notice the way a browser handles the file at that point is completely different on all browsers and is even handled differently on different operating systems. It sounds like you were able to utilize the content/download functionality to actually view the file in the browser, is that correct? What OS/Browser combo did you get that to work on? One other option that I thought I'd at least mention is using the Google PDF viewer to ensure the browser shows the PDF online rather then forcing the download. This is a nice way to ensure that your site is consistent across all browsers and OS's. I do this by constructing the link using the .filepath property, but I wrap it in a link to the Google PDF viewer. The final link ends up looking like this - http://docs.google.com/viewer?url='http://domain.com/var/path/to/file.pdf&embedded=true&width=700&height=1050' And if you're feeling really froggy, you can even open that as an iframe directly in a modal window on the site when the link is clicked. It's a nice little addition to any site. Hope that's somewhat helpful to you or someone else.
|