Hey, Web Geniuses...
I’m working on my next entry, and I’d like to embed a pdf into the text using HTML.
If I use the EMBED tag, the pdf embeds nicely in Safari, but doesn’t work at all in Firefox, and I haven’t even begun to check it in Windows just yet.
Any tips on how to best do this?
Update: Okay, I got it working fairly well in Vista on both IE and Firefox. Firefox for Mac still eludes me. If anyone knows how get Firefox for Mac to recognize embedded PDF’s, go ahead and comment.

Can’t be done. Firefox on Mac cannot display embedded PDFs (yet).
You could go old-school and put the PDF in a frame.
If the file is big enough that it doesn’t work as a simple image, then embedding it in HTML is probably not the best way to go.
And, of course, by embedding a PDF, whatever is inside will not be searchable using the website’s engine.*
* It’s quite possible I have no idea what I’m talking about.
Stop trying to get fancy and screenshot it.
Unless you want readers to be able to browse through a multipage doc in the middle of your blog. Are you mad, sir?
Shouldn’t this all go under “procrasturbation”?
I agree - just make a screen shot of it. A jpg should show up on all browsers.
Otherwise, host the pdf as its own page and provide a link to it in the blog - that way, as Earl pointed out, it could be searched by the engines. (Not sure if it’s searched when embedded).
Finally - if it’s just the text you want - you should be able to copy and paste it from the PDF. If you only have Reader (and not say, Acrobat), click on the text tool. You can’t alter the text, but you can grab it.
I agree with the above. PDFs are ideal for printing but kinda suck as part of a web page. There used to be a PDF plugin for Mac Netscape 4.x, but since those days it’s been all about Preview/Acrobat Reader in OS X. The old PDF browser plugin sucked in that it took forever to load, consumed a lot of memory, and tended to crash frequently.
I don’t know if you care about Linux, etc. users, but evince is the best PDF viewer for the GNOME Desktop. KDE users use kpdf I believe. I don’t have a PDF plugin for Firefox on Linux, but one may exist.
You can convert PDF to a reasonable HTML format using Acrobat or the free/opensource pdftohtml converter. (http://pdftohtml.sourceforge.net/)
If it’s got multiple pages and/or forms, you might wanna rethink using PDF and go w/a more web-friendly format. Or just have people d/l and use a PDF-specific app at their convenience.
Then again, I’m not sure what you’re trying to do exactly.
W
I agree with the above. PDFs are ideal for printing but kinda suck as part of a web page. There used to be a PDF plugin for Mac Netscape 4.x, but since those days it’s been all about Preview/Acrobat Reader in OS X. The old PDF browser plugin sucked in that it took forever to load, consumed a lot of memory, and tended to crash frequently.
I don’t know if you care about Linux, etc. users, but evince is the best PDF viewer for the GNOME Desktop. KDE users use kpdf I believe. I don’t have a PDF plugin for Firefox on Linux, but one may exist.
You can convert PDF to a reasonable HTML format using Acrobat or the free/opensource pdftohtml converter. (http://pdftohtml.sourceforge.net/)
If it’s got multiple pages and/or forms, you might wanna rethink using PDF and go w/a more web-friendly format. Or just have people d/l and use a PDF-specific app at their convenience.
Then again, I’m not sure what you’re trying to do exactly.
W
lack of browser displays for .pdfs is my one gripe about Camino as well. Pretty annoying for an otherwise mac-tastic little thing.
Crap. Sorry about the double post— and apparently not closing my links properly. I guess the Preview view strips out HTML or something.
Adding some (invisible) close tags now…
Hope that fixes it. Obviously you shouldn’t listen to me about web development :)
W
Hi Craig,
Assuming this is for sample pages of a screenplay, you might want to check with John August and/or David Anaxagoras; I’m pretty sure both of them have posted stuff like on their blogs in the past.
Or, if you want to go the quick and dirty route, just save as formatted ASCII and enclose in “pre” tags.
HTH - Mark
From a web site that features just such an endevour: “The obvious question is how to build pages that might take advantage of what the tag offers some users, but still enable users of other browsers or earlier versions to view embedded PDF files. Fortunately, we can use the tag and nest an tag within it to satisfy requirements of any browser that at least supports the tag.”
Go to this the page And the guy offers free advice… just don’t tell him you’re a zillionaire ; )
I should have previewed my post. The html tags, OBJECT and EMBED were deleted from the post as they were bracketed… but the web page describes the process in easy to follow steps.
I look forward to seeing your next entry… are you done yet?
this might be what you want - http://viewer.zoho.com/