on ‎2005 Aug 01 3:41 PM
Hello,
I am looking for a way to convert word files to pdf using Java. I am familiar with the jakarta POI project but unfortunally it doesn't contain this option. Does anyone have a sample code to do that?
Roy
Request clarification before answering.
Hello Roy,
You can explore the following options:
1). Use an opensource java-com inter-op tool like jawin,jacob to read and use various features of MS Word. I have used Jawin to manipulate word files. It works for me. It gave complete access to all MS Word features. For conversion into PDF, you will have to install PDF conversion plugin in your word. And, you can access it programatically. It's initally, a little messy, but as soon as you get a hang of it, its very simple and exiting.
You can find jawin at:http://jawinproject.sourceforge.net/
It's documentation has an example of MS PPT creation from Java. You can use it to create your implementation for MS Word.
2). If you are using MS Office 2003+ editions, you can give MS-WML (a microsoft xml format of Word documents) a shot. You can extract XML from MS Word, and then you'll need to figure out how can a PDF can be created form this XML file. You can check out the microsoft site for further details. You can also check out the following like abt WML:http://www.javaworld.com/javaworld/jw-07-2004/jw-0712-officeml.html
Also MS Link:http://msdn.microsoft.com/office/understanding/word/codesamples/default.aspx?pull=/library/en-us/odc_wd2003_ta/html/odc_wdalpine.asp
Hope this solves your problem.
Cheers,
Rahul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 15 | |
| 9 | |
| 6 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.