OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

API for converting file format

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
devendra
Guest





PostPosted: Mon Oct 13, 2003 6:05 am    Post subject: API for converting file format Reply with quote

I want to convert .pdf,.doc files to open office format from my c++ application.
What functions are available for it.
Help Please
Back to top
DannyB
Moderator
Moderator


Joined: 02 Apr 2003
Posts: 3991
Location: Lawrence, Kansas, USA

PostPosted: Mon Oct 13, 2003 7:05 am    Post subject: Reply with quote

What general approach are you planning to use?

If you want to write a C++ program that reads docs and converts them to another format, I can't be of much help. Do you mean that you might want to look at OOo source code and use that, or at least learn the technique, and write that into your C++ code? Sorry, I can't help.

Another possibility that you might have meant is that from a C++ program you want to connect to OOo and make it open a document and save it into another format. In order to do this, you will have to know some of the OOo API. Using the OOo API you can make OOo open a document, using any of its import filters, and then make OOo save the document into any other format using any of its export filters.

To learn the API, I would suggest starting with http://api.openoffice.org. Play with OOo Basic. It is easy, and a good way to experiment and familiarize yourself with the API. Easy to make quick changes and try them. Look at many other posts here on OOoForum. Lots of questions have been asked and answered here in the Macros and API section.

I have written a Document Converter as a Basic macro for OOo. You can download that from http://OOoMacros.org. Look at how that works.

There are two possibilities I can see for using C++ to drive OOo. On the Windows platform, you could use Visual C++ and use the OLE-Uno bridge to access OOo through Windows Automation. Another possibility is to use C++ on _any_ platform, and incorporate UNO directly into your program. I can't be much help with either approach, but I do know a bit about the first approach, as it would be similar to using any other Windows Automation language like Visual Basic, Visual FoxPro, Delphi, etc.
_________________
Want to make OOo Drawings like the colored flower design to the left?
Back to top
View user's profile Send private message
devendraC
Newbie
Newbie


Joined: 13 Oct 2003
Posts: 1

PostPosted: Mon Oct 13, 2003 8:47 pm    Post subject: Reply with quote

Thanks Danny for quick reply.
First sorry for wrong post.

Actually my c++ library(in Unix platform) is generating report in HTML format.
I want to convert this html report to other formats(.pdf,.sxw,.doc ). I want to use the OOo's API for it but neither any macro nor I want to connect to OOo and make it open a document and save it into another format.
I want to use the same library as do OO for converting file formats.

Thanks.
Back to top
View user's profile Send private message
DannyB
Moderator
Moderator


Joined: 02 Apr 2003
Posts: 3991
Location: Lawrence, Kansas, USA

PostPosted: Tue Oct 14, 2003 1:22 pm    Post subject: Reply with quote

devendraC wrote:

Actually my c++ library(in Unix platform) is generating report in HTML format.
I want to convert this html report to other formats(.pdf,.sxw,.doc ). I want to use the OOo's API for it but neither any macro nor I want to connect to OOo and make it open a document and save it into another format.
I want to use the same library as do OO for converting file formats..


I would suggest getting the source to OOo. Become familiar with it. Subscribe to and hang out on the developer mailing lists and begin learning.

Good luck.
_________________
Want to make OOo Drawings like the colored flower design to the left?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group