Looking for API (java) to convert .doc into .pdf

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Feb 2008
Posts: 51
Reputation: vedmack is an unknown quantity at this point 
Solved Threads: 0
vedmack vedmack is offline Offline
Junior Poster in Training

Looking for API (java) to convert .doc into .pdf

 
0
  #1
Jun 24th, 2008
Hi,

I'm looking for an java api which can convert .doc file into .pdf file... i need this solution to work without any intervention of MS Office/Windows.


If anyone have any idea about such api , please reply.

Thanks ahead

Daniel
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 796
Reputation: darkagn has a spectacular aura about darkagn has a spectacular aura about darkagn has a spectacular aura about 
Solved Threads: 110
darkagn's Avatar
darkagn darkagn is offline Offline
Master Poster

Re: Looking for API (java) to convert .doc into .pdf

 
0
  #2
Jun 24th, 2008
Davisor Publisher is a Java API that can convert from a DOC, PPT or PDF to PDF, XHTML, PNG, JPEG, TXT or XML formats. I haven't actually used it before but it seems to be a good one.
There are no stupid questions, only those too stupid to ask for help.
echo is a web developer's best friend.
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 51
Reputation: vedmack is an unknown quantity at this point 
Solved Threads: 0
vedmack vedmack is offline Offline
Junior Poster in Training

Re: Looking for API (java) to convert .doc into .pdf

 
0
  #3
Jun 25th, 2008
Thx darkagn!

gonna check it it
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 1
Reputation: bertt is an unknown quantity at this point 
Solved Threads: 0
bertt bertt is offline Offline
Newbie Poster

Re: Looking for API (java) to convert .doc into .pdf

 
-1
  #4
Jan 22nd, 2009
Another solution:

import officetools.OfficeFile;
...
FileInputStream fis = new FileInputStream(new File("test.doc")); // works with xls also
FileOutputStream fos = new FileOutputStream(new File("test.pdf"));
OfficeFile f = new OfficeFile(fis,"localhost","8100", true);
f.convert(fos,"pdf");

All possible convertions:
html --> pdf
doc --> pdf, html, txt, rtf
xls --> pdf, html, csv
ppt --> pdf, swf
from dancrintea.ro/html-to-pdf/
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 823
Reputation: verruckt24 is a jewel in the rough verruckt24 is a jewel in the rough verruckt24 is a jewel in the rough verruckt24 is a jewel in the rough 
Solved Threads: 73
verruckt24's Avatar
verruckt24 verruckt24 is offline Offline
Practically a Posting Shark

Re: Looking for API (java) to convert .doc into .pdf

 
0
  #5
Jan 22nd, 2009
iText is a free, open source Java to PDF converter and it offers much more.
Get up every morning and take a look at the Forbes' list of richest people. If your name doesn't appear.... GET TO WORK !!!
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 1,175
Reputation: stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light 
Solved Threads: 125
Featured Poster
stephen84s's Avatar
stephen84s stephen84s is offline Offline
Veteran Poster

Re: Looking for API (java) to convert .doc into .pdf

 
0
  #6
Jan 23rd, 2009
Verruckt24, I guess the O.P. by now must have already figured out how to accomplish this task.
"bertt" is the culprit who revived this thread older than almost 6 months and whats worse he doesn't even provide a decent answer, let alone use code tags or anything else.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."

"How to ask questions the smart way ?"
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,210
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 489
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: Looking for API (java) to convert .doc into .pdf

 
0
  #7
Jan 23rd, 2009
I did not look into iText for last 2 years. Did they extend the scope of documents that can be converted? As far I can remember it was only images gif, png, bmp, tiff, wmf and jpeg (there was problem with JPEG2000 - type of grey colour), html, txt, rtf, xml. Are you sure you can convert office formats like doc, ppt or xls to pdf?
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 823
Reputation: verruckt24 is a jewel in the rough verruckt24 is a jewel in the rough verruckt24 is a jewel in the rough verruckt24 is a jewel in the rough 
Solved Threads: 73
verruckt24's Avatar
verruckt24 verruckt24 is offline Offline
Practically a Posting Shark

Re: Looking for API (java) to convert .doc into .pdf

 
0
  #8
Jan 23rd, 2009
Originally Posted by stephen84s View Post
Verruckt24, I guess the O.P. by now must have already figured out how to accomplish this task.
"bertt" is the culprit who revived this thread older than almost 6 months and whats worse he doesn't even provide a decent answer, let alone use code tags or anything else.
Yes you are correct, I don't how but the post date somehow skipped my attention here.
Get up every morning and take a look at the Forbes' list of richest people. If your name doesn't appear.... GET TO WORK !!!
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 1,175
Reputation: stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light 
Solved Threads: 125
Featured Poster
stephen84s's Avatar
stephen84s stephen84s is offline Offline
Veteran Poster

Re: Looking for API (java) to convert .doc into .pdf

 
1
  #9
Jan 23rd, 2009
Actually to convert from .doc to .pdf via Java I could not find a direct method, But I found a two step process,
  1. Access your Microsoft Format files using Apache POI, You can read more about it here.
  2. Next use iText to convert the data you have into a PDF.
Last edited by stephen84s; Jan 23rd, 2009 at 8:18 am.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."

"How to ask questions the smart way ?"
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 3
Reputation: salinidinesh is an unknown quantity at this point 
Solved Threads: 0
salinidinesh salinidinesh is offline Offline
Newbie Poster

Re: Looking for API (java) to convert .doc into .pdf

 
0
  #10
Feb 13th, 2009
I tried the convertion method that bertt's described . bt I can't get the jar that contain the ' import officetools.OfficeFile' can any one please suggest a method to convert HTML to PDF
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Java Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC