|
Mailing Lists
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
Extracting text from various file-types
Hello again to all.Robert Rhodes 08/10/12 06:08 P Check out the CFFILE tag. That offers this type of functionality.Bruce Sorge 08/10/12 06:12 P Hi Bruce. Thanks for the reply.Robert Rhodes 08/10/12 06:48 P For word, did you add the attribute in cffile action="readbinary"?Bruce Sorge 08/10/12 07:07 P Hello again to all. I need a way to extract text from word, excel, text, pdf, and ppt files with Coldfusion, as the files are each submitted via a form. The output does not have to be particularly pretty or nicely formatted -- just plain text that can be stored and searched later. Any ideas? --RR Check out the CFFILE tag. That offers this type of functionality. Bruce On Aug 10, 2012, at 4:07 PM, Robert Rhodes <rrhodescf@gmail.com> wrote: ----- Excess quoted text cut - see Original Post for more ----- Hi Bruce. Thanks for the reply. I did, but no luck. On text files, I got the text just fine. On Word docs, I got the text but with a whole bunch of garbage in the return. On ppt, pdf, and excel docs, they all come out as unreadable garbage. I tried both the "read" and "readbinary" actions and they both did not work. Maybe I am doing something wrong? I am using CF9. -RR ----- Excess quoted text cut - see Original Post for more ----- For word, did you add the attribute in cffile action="readbinary"? For excel, there is a cfspreadsheet tag that will read a spreadsheet and you can put a query attribute on it and output the result. For PDF's, there is a cfpdf tag that you can use. Obviously you will have to get the file type then use cfif to tell the page which tag to use for which file. Hope this helps Bruce On Aug 10, 2012, at 4:48 PM, Robert Rhodes <rrhodescf@gmail.com> wrote: ----- Excess quoted text cut - see Original Post for more ----- I do not have the URL handy but take a look at Raymond Camden's blog. He wrote an entry on extracting text from MS Office documents using POI. For PDF, use cfpf's extract text option. -Leigh
|
May 18, 2013
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||