| View previous topic :: View next topic |
| Author |
Message |
herberts Newbie

Joined: 03 Oct 2003 Posts: 2
|
Posted: Fri Oct 03, 2003 1:44 am Post subject: Btach conversion of SXW documents to PDF |
|
|
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 |
|
 |
DannyB Moderator


Joined: 02 Apr 2003 Posts: 3991 Location: Lawrence, Kansas, USA
|
Posted: Fri Oct 03, 2003 6:30 am Post subject: |
|
|
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 |
|
 |
DannyB Moderator


Joined: 02 Apr 2003 Posts: 3991 Location: Lawrence, Kansas, USA
|
Posted: Fri Oct 03, 2003 6:43 am Post subject: |
|
|
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 |
|
 |
dungm Guest
|
|
| Back to top |
|
 |
|