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

Btach conversion of SXW documents to PDF

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer
View previous topic :: View next topic  
Author Message
herberts
Newbie
Newbie


Joined: 03 Oct 2003
Posts: 2

PostPosted: Fri Oct 03, 2003 1:44 am    Post subject: Btach conversion of SXW documents to PDF Reply with quote

Hi,

I need to batch process SXW documents to generate PDF output. Is there an API or a filter that can do that with good performance (soffice -p does not qualify there...).

I would be really interested in an XSLT sheet that does a SXW to XSL-FO conversion, since FOP could post process those FO into generating PDF.

Thanks for you replies,

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


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

PostPosted: Fri Oct 03, 2003 6:30 am    Post subject: Reply with quote

Here is a crude tool written in Basic. It's ugly (no graphics) and incomplete. But it may solve your problem.

Go here...

http://kosh.datateamsys.com/~danny/OOo/Tools/

Download the DocConverter file. It is an OOo Drawing with macro code. (You may have to right-click -> Save Link Target As...)

It works something like this....
1. Open the drawing.
2. Click the button. A dialog box appears.
3. Specify the pathname to a folder containing all of the documents you want to convert.
4. Specify the pathname to a folder where you want all of the converted documents to go.
5. Click Next. (Next page appears.)
6. Specify what type of documents you want to convert.
7. Click Next.
... (Keep answering the questions and clicking Next.)

Sorry for the incomplete procedure. But you should be able to successfully convert a large batch of SXW files into PDF.

All files to be converted must be at the top level of the folder. (Sorry, I would have made it recursive, but OOo Basic (yuk!) does not even have such nicities as recursion or data structures.)

You can look at the code to see how it works to adapt it to your purposes. Another source of example code is several postings I've made in the Macro's and API section. See this posting in particular.

http://www.oooforum.org/forum/viewtopic.php?t=2668

This evolved into a discussion about document conversion, and is how the above document converter macro was developed. I've posted some code in this discussion which might be helpful.

Even with this, a converter in Basic may not be satisfactory. If you have hundreds of thousands or millions of documents in nested folders, then you may need something recursive in Java. If you get the developer's SDK for OOo, in the Examples it has both a Java conversion program and a Java servlet to do document conversions. You can probably use these or adapt them to your needs.

Hope this helps.
_________________
Want to make OOo Drawings like the colored flower design to the left?


Last edited by DannyB on Fri Oct 03, 2003 6:47 am; edited 1 time in total
Back to top
View user's profile Send private message
DannyB
Moderator
Moderator


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

PostPosted: Fri Oct 03, 2003 6:43 am    Post subject: Reply with quote

I just updated my document converter tool at the above URL. Be sure you get the one dated on or after 2003-10-03 (today). I had never tested it on Windows before.

Apparently, the Windows OOo does not like trying to display the Folder Picker dialog with an invalid pathname.
_________________
Want to make OOo Drawings like the colored flower design to the left?
Back to top
View user's profile Send private message
dungm
Guest





PostPosted: Sat Oct 18, 2003 12:52 pm    Post subject: Reply with quote

please see the reply post on oodoc forum
http://www.ooodocs.org/modules.php?name=Forums&file=viewtopic&t=1037&sid=f82471875d0d0775916f29332b624ce7
cheers
dung
Back to top
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer 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