• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Convert word into html in unix environment

New Here ,
Dec 17, 2008 Dec 17, 2008

Copy link to clipboard

Copied

We are in the process of developing a coldfusion web application which allows the users to upload resumes in word format. Once the word document is uploaded we need to convert the word document into html on the fly. We know it can be accomplished using com object in the windows platform. But ours is a unix environment. We need some coldfusion coding which can convert the uploaded word file into html. Please take note coldfusion server runs on unix platform in our case.
TOPICS
Advanced techniques

Views

873

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Dec 17, 2008 Dec 17, 2008

Copy link to clipboard

Copied

I'm not aware of a native CF method for working with Word files. You might try the Java version of Aspose.Words.

http://www.aspose.com/categories/file-format-components/aspose.words-for-.net-and-java/default.aspx#...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 17, 2008 Dec 17, 2008

Copy link to clipboard

Copied

It seems it can convert word to html platform independent. The issue here is we need to convert the uploaded word file at run time.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Dec 17, 2008 Dec 17, 2008

Copy link to clipboard

Copied

quote:

Originally posted by: Mr Th
it can convert word to html platform independent.


For clarification what does "it" refer to, ColdFusion or Aspose.Words?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 17, 2008 Dec 17, 2008

Copy link to clipboard

Copied

"it" refers to Aspose.Words

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Dec 17, 2008 Dec 17, 2008

Copy link to clipboard

Copied

quote:

The issue here is we need to convert the uploaded word file at run time.


Can you describe the workflow you have in mind?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 17, 2008 Dec 17, 2008

Copy link to clipboard

Copied

Yes. I can.
1) We have a form which allows the user to upload word (.doc) file.
2) When the user submits the form, word file will be uploaded to a directory in the server. Say now we have test.doc in the server
3) we need to convert the test.doc into test.html

The last stage seems to be a daunting task.
Once again we are on Unix environment.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Dec 17, 2008 Dec 17, 2008

Copy link to clipboard

Copied

For step 3 call a 3rd party component such as Aspose.Words to handle converting test.doc to test.html. I'd recommend wrapping this logic inside a CFC.

For example using Aspose.Words java object appears to be as easy as the Java code:
Document doc = new Document(getMyDir() + "Document.doc");
doc.save(getMyDir() + "Document.ConvertToHtml Out.html", SaveFormat.HTML);

Note: I've used the .NET version of Aspose.Words, not the Java version, but I've been pleased with the product.

Aspose.Words formats supported
http://www.aspose.com/documentation/file-format-components/aspose.words-for-.net-and-java/com/aspose...

You might also investigate Apache POI
http://poi.apache.org/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Dec 17, 2008 Dec 17, 2008

Copy link to clipboard

Copied

LATEST
See quick and dirty sample of how using a java object might work for you. Note that this code is not tested. I'm not a java expert so if anyone sees a problem with my sample please share your thoughts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation