January 15, 2005

Bookmarklet for Firefox to convert Adobe Acrobat PDF files to HTML

My old Adobe Acrobat PDF to HTML bookmarklet stopped working recently because Adobe have changed the url and code of their conversion tool on their site, so I've updated my bookmarklet so it now works with their new conversion tool.

To add it to your browser, you have to create a new bookmark and then copy and paste the script in bold below in its entirety into the URL part of the bookmark and name the bookmark something like PDF 2 HTML. Then whenever you visit a pdf page that you want to convert to HTML just click the bookmarklet, and follow the prompts. This script only works on Firefox, it doesnt work on I.E, I havent tested it on any other browsers.

javascript:'<html><body onload=%22if(confirm(\'Do you want to convert the current browser document from PDF to HTML?\')) {document.forms[0].submit();} else {document.blah.srcPdfUrl.value=prompt(\'Enter the URL of the PDF document you would like to convert to HTML\');if (document.blah.srcPdfUrl.value.length)document.forms[0].submit(); else history.go(-1);}%22><form name=blah method=post action=%22http://access-sjc0.adobe.com/access/convert.do%22><input type=hidden name=acceptLanguage value=en><input type=hidden name=convertTo value=html><input type=hidden name=visuallyImpaired value=false><input type=hidden name=preferHTMLReason value=PDF+SUCKS%2C+HTML+ROCKS><input type=hidden name=platform value=Windows><input type=hidden name=comments value=x><input type=hidden name=srcPdfUrl value=' + location.href + '>We are now gonna convert the pdf at <p><b> '+location.href+' </b></p>into HTML. </form></body></html>'



Posted by steeev to Bookmarklets

at January 15, 2005 09:34 AM
Comments