I use wvHtml for doc->html, wvPDF for doc->pdf, but antiword for doc->txt. To convert .docx, .xls, .xlsx, and WordPerfect files to HTML, I use OpenOffice, by way of jodconverter. For ODF files, I use OdfConverter. Conversion of Excel files to .csv files uses xls2csv. For PowerPoint files, I use ppthtml to convert to html, and catppt to convert to text. For Lotus 1-2-3 files (I added this after downloading some historical telecom data from the FCC!), I use ssconvert.
Any conversion that results in an HTML file (e.g. doc or pdf to html) I bundle all the images into a single file using the data: url scheme. To do this, I wrote a utility called pagecan: http://afiler.com/pagecan/
Re:HTML preview for doc, docx, pdf & rtf
by p4bl0 on Thursday May 19, 2011 @06:44AM
(#2563516)
Also, a <title> tag would be useful :-).
But apart from this, I now I'll face this very problem soon (well, for a relatively fluctuant value of "soon"), so thank you very much for sharing this _raghu!
Re:HTML preview for doc, docx, pdf & rtf
by _raghu on Thursday May 19, 2011 @11:22AM
(#2564198)
Tika is very good at converting documents to plain text. Very reliable too. The problem for us was that, most resumes have a lot of formatting in them. For example candidates use tables to structure data. When such a resume is converted to plain text using tika, it looks jumbled.
Will take a look at pandoc. Thanks for suggesting.
Re:HTML preview for doc, docx, pdf & rtf
by _raghu on Thursday May 19, 2011 @11:26AM
(#2564209)
Haven't tried antiword. As of now I find abiword pretty stable for both doc and docx. I need more data but I found a few cases where it just hanged while converting. There is no specific pattern to when the program hangs. For now I am logging such cases and timing out the conversion in 3 seconds.
Re:HTML preview for doc, docx, pdf & rtf
by tucosan on Thursday May 19, 2011 @10:05AM
(#2563928)
How about trying out calibre http://calibre-ebook.com
It can do all kinds of conversions from a number of formats, it is quite reliable, and it can be run headless.
Re:HTML preview for doc, docx, pdf & rtf
by jamesshamenski on Thursday May 19, 2011 @11:08AM
(#2564137)
Million Dollar Question:
How could you additionally parse the information to extract structured data? For example; names of candidates, addresses, previous employers, job titles held.
Re:HTML preview for doc, docx, pdf & rtf
by earle on Thursday May 19, 2011 @11:15AM
(#2564172)
That's been done across online job boards since 1996 when we launched hotjobs. Resumes, although varying aesthetically contain a pretty ridged structure that presents itself well to localized extraction. This allows easy term extraction for searching across a very large data set quickly.
A simple 30 line flex/yacc combo will work effectively at a high ninety percentile
Re:HTML preview for doc, docx, pdf & rtf
by Jakob on Thursday May 19, 2011 @09:14AM
(#2563795)
Please add a candidate delete function. I sent an email with candidate with multiple attachments and Recruiterbox created multiple candidates by mistake.
I use wvHtml for doc->html, wvPDF for doc->pdf, but antiword for doc->txt. To convert .docx, .xls, .xlsx, and WordPerfect files to HTML, I use OpenOffice, by way of jodconverter. For ODF files, I use OdfConverter. Conversion of Excel files to .csv files uses xls2csv. For PowerPoint files, I use ppthtml to convert to html, and catppt to convert to text. For Lotus 1-2-3 files (I added this after downloading some historical telecom data from the FCC!), I use ssconvert.
Any conversion that results in an HTML file (e.g. doc or pdf to html) I bundle all the images into a single file using the data: url scheme. To do this, I wrote a utility called pagecan: http://afiler.com/pagecan/
But apart from this, I now I'll face this very problem soon (well, for a relatively fluctuant value of "soon"), so thank you very much for sharing this _raghu!
I am curious for more details about why Tika wasn't good enough. Please explain.
Will take a look at pandoc. Thanks for suggesting.
Also, what are the limitations of abiword for doc/docx files?
Where do you get your doc files?
Are they the just ones submitted to your site, or is there a pastebin or similar repo of doc files?
How could you additionally parse the information to extract structured data? For example; names of candidates, addresses, previous employers, job titles held.
A simple 30 line flex/yacc combo will work effectively at a high ninety percentile
Could we see some code or a demo?