PPRuNe Forums - View Single Post - Putting pdf page on the web
View Single Post
Old 22nd Sep 2009, 17:01
  #15 (permalink)  
cessnapuppy
 
Join Date: Jun 2009
Location: Georgia
Posts: 169
Likes: 0
Received 0 Likes on 0 Posts
Smile

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/jav...bat_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!
cessnapuppy is offline