codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  APIs to convert file format  Messy at 06:23 on Wednesday, May 04, 2005
 

Hey All,
Is there any kind of APIs to convert Doc files to Txt files

please let me know

If possible send the Link to learn more

Thanx in Advance

Take care
Bye

  Re: APIs to convert file format  InteractiveMind at 11:58 on Tuesday, May 24, 2005
 

The method you'd need to use, would be to read in the content of the .doc file, then convert it into an ANSI text format. Then output that to the new text document.

Problem is though, Microsoft keep very hush about their data formats; and I have not seen any existing Java API's that read in .doc formats, and parse them..

Sorry.

But if it's really important that you do this, then you may be able to find an existing DLL online, which parses the .doc format. You can then use JNI to implement this DLL with your Java program (although this will destroy the compatibilty of your java program).

An alternative solution, would be to get a dedicated machine, which loads the .doc file into Word. It then highlights the text, and copies it. It then outputs that copied data to a .txt file! ;-)

You could alternatively get this product: http://www.softinterface.com/Convert-Doc/Convert-Doc.htm
It has command line support, meaning that you can run it via your Java program secretly!! :-)

An example of running a command line application using Java, is here: http://www.javaalmanac.com/egs/java.lang/Exec.html

You can then capture the output like so: http://www.javaalmanac.com/egs/java.lang/ReadFromCommand.html?l=rel


Hope that helps.
Rob.


  Re: APIs to convert file format  kanad at 14:58 on Wednesday, May 25, 2005
 

check Out these Links
http://www.winfield.demon.nl/
--
http://jakarta.apache.org/poi/
Java API To Access Microsoft Format Files
--
Kanad








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums
//








Recent Forum Threads
•  Re: Multiple words in regexp
•  Re: How to open a MS Word document from Javascript
•  controlling an app in foreground from one running in background
•  Re: Plz its urgent:validation code
•  Carrying Value of Checkbox
•  problem in unzipping the zip files
•  Re: substitution using vars containing $1
•  frameElement question
•  What is the problem with this macro


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2007