Jon
Jon

Reputation: 2279

Javascript and CSS Lightbox that can view PDFs

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

Upvotes: 4

Views: 23606

Answers (7)

artViper
artViper

Reputation: 36

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!

Upvotes: 1

anonymous coward
anonymous coward

Reputation: 12824

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.

Upvotes: 1

Jerod Venema
Jerod Venema

Reputation: 44642

http://stickmanlabs.com/lightwindow/

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

Upvotes: 2

Tom van Enckevort
Tom van Enckevort

Reputation: 4198

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.

Upvotes: 0

David Snabel-Caunt
David Snabel-Caunt

Reputation: 58371

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.

Upvotes: 0

ajm
ajm

Reputation: 20105

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

Upvotes: 0

Randolpho
Randolpho

Reputation: 56439

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.

Upvotes: 1

Related Questions