PDA

View Full Version : Putting pdf page on the web


BOAC
17th Sep 2009, 12:05
I have had little success in placing a pdf on a page so it can be 'seen'. I've tried adobe's 'converter' but it loses a bit of the image positioning and finer font embellishments, and capturing as an image does not produce a file with enough bytes for the detail. Anyone got any (free) tricks?

Keef
17th Sep 2009, 12:38
AFAIK PDF won't display in the "native" format of a browser.

What I do is to upload the PDF to my website, and put a link on a page that says "PDF of HO60 form" with a hyperlink to the PDF. That triggers a "download and display" to anyone who has PDF reader tied into their browser.

BOAC
17th Sep 2009, 13:05
Thanks Keef, I'm happy with the download option., I just wanted to display the pdf. I've got round it by using the (modified) product of the Adobe converter and inserting the image in a CSS page.

Nige321
21st Sep 2009, 19:02
Why not just open the PDF, take a screen shot and put the JPEG on the web page?

Nige

cessnapuppy
21st Sep 2009, 20:50
Nige has it!

I'd add this wee bit extra..

<a href="http://www.airfranceklm-finance.com/sysmodules/RBS_fichier/admin/forcedownload.php?id=1172">Click here for PDF<br><img src="Airfrance.jpg" alt="Air france KlM 2009 Traffic" border="0"></a>

.... this gives us the result below:

Click here for PDF
http://i37.tinypic.com/9hugbc.jpg (http://www.airfranceklm-finance.com/sysmodules/RBS_fichier/admin/forcedownload.php?id=1172)

Saab Dastard
21st Sep 2009, 21:24
cessnapuppy,

What is your link trying to achieve? I don't think it is living up to your expectation...

SD

cessnapuppy
21st Sep 2009, 21:45
umm....it wastnt supposed to link anywhere!
it was just an example of how to format the html!

ooops..should make that clear, brb
...edit... done!

BOAC
21st Sep 2009, 22:11
Thanks for your interest, nige and cp, but may I refer you to post #1?and capturing as an image does not produce a file with enough bytes for the detail.

cessnapuppy
21st Sep 2009, 23:45
When you offer the link to the pdf (with a jpeg displayed as a thumbnail ) then you allow them (your user) to get a quick view of what the document represents, clicking on the link or image allows them to download it (or view it richly and directly in the browser if the have the PDF plugin for their browser.

This is the best, simplest and most accessible way of present PDF and other rich media and will work on ANY browser, not just desktops, but PDA's, Iphones, cellphones and even assistance technology for the blind.

You CAN go another route, and render the pdf directly in FLASH as an SWF file.
www.pdfmenot.com | TECNERD (http://www.tecnerd.com/2009/09/10/flash-pdf-viewer-free-online-pdf-viewer-pdfmenot/)

This works well if you dont want or cant install the adobe pdf reader.
There are also alternatives to the adobe reader as well, eg. "Foxit"

treadigraph
22nd Sep 2009, 12:12
I've done what I think you are trying to achieve by opening the PDF page with Photoshop and then saving it as a web optimised JPG at the size I want to display it (say 800dpi width if text needs to be legible) - with a reasonable level of compression the jpg file need not be very big at all.

Cheers

Treadders

BOAC
22nd Sep 2009, 13:21
treders - see posts #1  - the detail was insufficient to do justice to the photo in the PDF.

cessnapuppy
22nd Sep 2009, 13:36
what is it exactly, do you want to do?
If you want them to read and browse the PDF in the same manner as if they were using the PDF reader, then they need the pdf plugin

Embedding as a swf is another option.

see here, this may be what you are looking for
PDF Developer Junkie: Using the HTML embed Tag to Display a PDF on Your Web Page (http://blogs.adobe.com/pdfdevjunkie/2007/08/using_the_html_embed_tag_to_di.html)

BOAC
22nd Sep 2009, 15:51
what is it exactly, do you want to do?I have had little success in placing a pdf on a page so it can be 'seen'. exactly that - no plug-ins, simple raw html stuff - just hoping someone (like Adobe) has a pdf-html converter that actually works better than Adobe's 'pdf2html'. That last link is good, but still needs the plug-in as I read it. I cannot assume my 'readers' have all got that far in silver-surfing, and we do want them to buy the quality product displayed:)

treadigraph
22nd Sep 2009, 16:21
Ah, but have you simply done a "print screen" BOAC?

Photoshop will open the original PDF at the resolution you specify; so as long as the PDF itself isn't low res, you ought to get a reasonable result I'd have thought.

If you would like me to have a try for you, email it to me at [email protected].

Cheers

Treadders

cessnapuppy
22nd Sep 2009, 17:01
exactly that - no plug-ins, simple raw html stuff - just hoping someone (like Adobe) has a pdf-html converter that actually works better than Adobe's 'pdf2html'. That last link is good, but still needs the plug-in as I read it. I cannot assume my 'readers' have all got that far in silver-surfing, and we do want them to buy the quality product displayed

well, you cant have it both ways I'm afraid (and that's what she said!)

Two things. If you are creating the pdf files (i.e. you are the original content creators) then you simply save as HTML (losing some of the fine font control and layout possibilities) - but still transferring all of the readable information.

If the pdf files are NOT of your doing, i.e. supplemental information that comes with a parts catalog for example - you are forced to use the pdfs 'as is', then conversion is looking like your only option either to using a reader/viewer like flash, which, although yes, another plug-in, is found almost every on machines (but not on mobile devices which many people are using)
Cross-browser compatibility is one of my specialties, as well as accessibility compliance, but something has to give. Unless you are willing to spend an inordinate amount of time duplicating a visual exactness (very hard to do with HTML+CSS without introducing tons of non-semantic elements and html clutter, while still failing to get 100% visual accuracy against all browsers) then you are wasting your time.

You also have to make intelligent adjustments for your target (purchasing audience) I am sure that they will have a PC with Flash and PDF support. For total accessibility, you cant rely on that, so a plainer html version of the pdf (with graphics) will be accessible by all and is your best bet and will provide info the prospective purchaser needs. Remember: you are trying to make a sale, not necessarily impress them with your HTML formatting skills.

If you are so inclined, you could probably interrogate the browser and see if they support PDF and render content accordingly

Acrobat (PDF) Detect (dithered.com) (http://dithered.chadlindstrom.ca/javascript/acrobat.html)
http://dithered.chadlindstrom.ca/javascript/acrobat_detect/acrobat_detect.txt

Summary: Html version with images and link to fully formatted PDF
Jpeg (medium resolution thumbnail and link to PDF and/or HTML version)

use Javascript to detect if pdf plugin support exists and then output code for the pdf plugin or the alternate.

The way I do it is create a div first with the basic content
<div id="product1">
blah blah blah html
</div>

<script>
set div "product1" innerHTML to have the pdf plugin embed code
</script>


if there is no javascript support, then the script wont execute, and thus the original content is shown.

Note: the above code is PSEUDOCODE dont try to copy and paste it (or click on it, lol) its just to illustrate what we are trying to do!

BOAC
22nd Sep 2009, 17:22
Thanks Treders and Cessna - all good stuff (I don't have PS...). At the moment I'm content with what I have done. White flag waving....:)

cessnapuppy
22nd Sep 2009, 17:33
hope we can see the site soon! all this chatter got me curious :)