Word HTML Cleaner – Word to HTML to PDF
Saving a word doc to html simply creates junk. Disgusting code that noone can work with.
Well today for Dickerson Driving School‘s new student contract registration system I have to take a word doc, save it to html, have it dynamically edited based on a user’s database info, and render a resulting customized pdf.
The first step was to edit the saved html from the original word doc so it would render correctly with html2pdf converters. Enter Testism’s Word HTML Cleaner. It not only cleans out the trash that word renders when saving html files, it does it pretty damn well. Using the newly cleaned up code I can easily adjust spacing and formating.
Now that we have an html file that we can work with we plug it into DomPDF, a free open source PHP5 based HTML to PDF tool. While there are multiple programs that can do the conversion, I need something that can be installed on the server so it can be modified to search the db for a specific user’s information and render the pdf’s on the fly.
Comments(0)