Tutorial :Javascript and CSS Lightbox that can view PDFs



Question:

Has anyone ever found any lightbox type javascript / css code that can display PDFs? I have tried many libraries and none have worked for me. The environment needs to be IE6/IE7 compatible.

I am looking for something similar to this: Lightbox 2


Solution:1

http://stickmanlabs.com/lightwindow/

Specifically, check out the demo "Flash Paper" for embedding PDFs


Solution:2

Good luck finding anything that will display a PDF in browser without a plugin.

You might consider embedding an IFrame that points to the PDF in a lightbox style. That's about the best you'll be able to do, though.


Solution:3

To sum up your options:

If a screen-shot of a portion of the PDF is good enough, then as tomlog answered, you could find a library or existing code to extract said portion as an image, and display that image in the "lightbox".

If, however, you need actual PDF-viewing functionality, it can not be done in IE6/7 without loading into an Adobe Flash/swf object, or contained within the official Adobe Reader browser plug-in somehow.

Going the plug-in route, you will have to use an iFrame.

If the Flash/embedding approach seems better, jvenema suggested http://stickmanlabs.com/lightwindow/ which has a "Flash Paper" demo (Flash Paper is the official way to embed PDF documents) you could check out, or embedding something else, as seen at http://www.scribd.com/ and others.


Solution:4

artViper's bumpbox

Bumpbox 2.0 a lightbox clone with support for PDF, flv, swf, audio, images, inline HTML and remote html files. Now also plays Youtube© & Vimeo© videos directly out of the box!


Solution:5

If it's not here, it's not anywhere: lightbox clones


Solution:6

You have a couple of solutions here

You could embed the PDF in an iframe (in a lightbox or panel) like http://www.cs.tut.fi/~jkorpela/html/iframe-pdf.html

Otherwise you could upload the PDF to a document sharing site like Issuu and embed their swf in your web page.


Solution:7

If you can find a PDF library that allows you to convert each page to an image (JPEG, GIF or something), then you could display those in your lightbox.

Obviously you would lose all the zooming and paging functionality of the PDF.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »