It seems that I've answered my own question… I realized that, as Jeffrey Kretz mentioned, I needed to rely on Flash to do the PDF rendering … it was obviously not something that Javascript would do. I found several good solutions for an online PDF viewer, my favorite being issuu.com. With the viewer taken care of, then all that's needed is to embed it in an iframe, or (my preference) put it in a thickbox, fancybox, shadowbox, etc. modal window. The solutions I found are:
* Issuu ( issuu.com ) <-- My Favorite * iPaper ( scribd.com ) * Vuzit DocuPub ( http://vuzit.com/products/docupub_platform ) * embedded Google Docs ( docs.google.com ) <--- a very nice quick & easy, on-the-fly solution … see below… * ZOHO Viewer ( viewer.zoho.com ) * PDFMeNot ( pdfmenot.com ) Issuu is really an awesome viewer, though all of the others have their merits (I can't speak for PDFMeNot, though, 'cause I could never get it to work … maybe that speaks for itself?). Issuu's SmartLook feature (issuu.com/smartlook) searches your sites and converts all your links to PDFs so that they pop in in Issuu's modal window instead. I'm trying to get it to work on my site now. iPaper is very nice too. It has a book format which, while not as sleek as Issuu's magazine format, is still impressive. Vuzit has a free edition, but it's basically commercial. Not too expensive for starters. It does allow you to protect your documents from copying and downloading, at least it says. The Google Docs thing is pretty handy -- you don't even need to upload your document anywhere, just do like so: <iframe src="http://docs.google.com/gview?url=http:// infolab.stanford.edu/pub/papers/google.pdf&embedded=true" style="width: 600px; height:500px;" frameborder="0"></iframe> …and voila, a PDF in your webpage. That would be cool to use with a database -- just pull the url of the PDF into your script and Google handles the rest. The interface is pretty basic, but it works. Right now I'm trying to embed an Issuu PDF inside a FancyBox. Props to fancybox.net … whoever you are.