Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Open office api usage

 
michael yue
Ranch Hand
Posts: 204
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
A simple question here. I read about the openoffice api at http://faq.javaranch.com/view?AccessingFileFormats

Is it possible to use this api to convert html to pdf ? Has anyone tried this on any projects. Found that not much resource on net on this api. Thanks
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not too familiar with OpenOffice, but I know that people use the API to create PDFs. If OO can open HTML files, then what you ask should be possible.
 
michael yue
Ranch Hand
Posts: 204
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I install and use open office and I can open a html file and straight direct convert it to pdf. Problem is how can I use its api to do this. Not much examples that I can obtain from its website or anywhere else. Maybe this api is not getting enough exposure but if manage to leverage it can be a powerful tool.
 
michael yue
Ranch Hand
Posts: 204
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I tried to run some examples from the open office example download with its sdk. It mention i should invoke the following command to connect to the running office server.

soffice "-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager"

Can this command be run from windows machine? I tried at the command prompt and unsucessful. Thanks
 
Aj Parsekar
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Most likely cause is that your code cannot find soffice. http://user.services.openoffice.org/en/forum/viewtopic.php?f=44&t=2520 has a solution to this problem.

Also the following three sites are very useful for OOo related issues.

http://www.oooforum.org
http://documentation.openoffice.org/
http://wiki.services.openoffice.org/wiki/Main_Page

 
Rob Spoor
Sheriff
Posts: 20822
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Aj, nice of you to post that, but this thread is 3.5 years old, and Michael hasn't been active in almost half a year. http://faq.javaranch.com/java/DontWakeTheZombies
 
If you're gonna buy things, buy this thing and I get a fat kickback:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!