even after extracting .docx and other similar formats require a full blown dedicated parser to convert to html, unoconv is an excellent tool to convert most extensions to html (all of the extentions supported by libre office). Assuming that it is installed and added to your path, here is a simple nodejs script to automatically convert the a document file to html and then preview it in the browser: https://gist.github.com/3744524
unoconv ships with libre office, but to install it separately use apt-get/pacman etc on linux and for windows follow instructions in the following url : http://ask.libreoffice.org/question/4648/windows-install-unoconv/ hope this helps hamza On Monday, 17 September 2012 19:11:53 UTC, Abramovick wrote: > > yeh with .docx files, i'll need to unzip them first. > > On Mon, Sep 17, 2012 at 7:14 PM, José F. Romaniello > <[email protected]<javascript:> > > wrote: > >> Oh, I almost forgot, but few weeks ago I was looking for a tool that can >> convert from markdown to pdf, and I found pandoc: >> >> http://johnmacfarlane.net/pandoc/ >> >> which, I think it can convert from any format to any other.. including >> docx. You might want to have a look into that >> >> 2012/9/17 José F. Romaniello <[email protected] <javascript:>> >> >> not sure if this will help you, but docx files are in fact..zips, with a >>> bunch of xml inside. >>> >>> Have you tried opening with 7z or something alike? >>> >>> >>> 2012/9/17 Abramovick <[email protected] <javascript:>> >>> >>>> Here is What am trying to do. I made a simple docs sharing >>>> application. So a user can write a new document and share that >>>> document by giving its unique URL to someone. E.g. lets say my website >>>> is, www.quickdocs.com, if you make a new document, the app will provide >>>> u a new unique URL e.g. >>>> www.quickdocs.com/**j2341kk3n5k5asd32/<http://www.quickdocs.com/j2341kk3n5k5asd32/> >>>> and u can then share that URL with someone. The app also supports >>>> file uploads. So a user can upload a file, modify, and share it. >>>> >>>> Having said that, My problem is on the upload bit. The app supports >>>> image uploads, and text file uploads. but i want to support micosoft >>>> office >>>> docs with (.doc or .docx) extension. Now obviously these type of files >>>> have >>>> a different character encoding, so there has to be some sort of >>>> conversion. >>>> So is there any Library or API that can convert such files. I've seen >>>> unoconv, but its not supported on windows. Currently i am developing the >>>> app on both arch linux env and windows. so the Library / API has to be >>>> supported on both linux/unix and windows environments. >>>> >>>> Thanks >>>> >>>> -- >>>> Job Board: http://jobs.nodejs.org/ >>>> Posting guidelines: >>>> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines >>>> You received this message because you are subscribed to the Google >>>> Groups "nodejs" group. >>>> To post to this group, send email to [email protected]<javascript:> >>>> To unsubscribe from this group, send email to >>>> [email protected] <javascript:> >>>> For more options, visit this group at >>>> http://groups.google.com/group/nodejs?hl=en?hl=en >>>> >>> >>> >> -- >> Job Board: http://jobs.nodejs.org/ >> Posting guidelines: >> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines >> You received this message because you are subscribed to the Google >> Groups "nodejs" group. >> To post to this group, send email to [email protected]<javascript:> >> To unsubscribe from this group, send email to >> [email protected] <javascript:> >> For more options, visit this group at >> http://groups.google.com/group/nodejs?hl=en?hl=en >> > > -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
