[Solved] How do I find filters for export?

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
ptoye
Posts: 225
Joined: Mon Apr 21, 2008 11:07 am
Location: Reading, England

[Solved] How do I find filters for export?

Post by ptoye »

I may need to use a macro to save a Write document in one of PDF, RTF or Ms-Word format (don't know which yet). I've found a list of filters in FilterFactory, but their names don't say whether they're input or output filters. Anyone here got any idea how to find out?

Or are filters bi-directional, in which case I assume I need "writer_pdf_Export", "Rich Text Format", and "MS Word 97"?
Last edited by floris v on Fri Feb 13, 2015 12:33 pm, edited 2 times in total.
Reason: Added solved icon
Peter
OO 4.1.1 on MS Windows 7 64-bit
FJCC
Moderator
Posts: 9277
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: How do I find filters for export?

Post by FJCC »

Does this help? https://wiki.openoffice.org/wiki/Framew ... st_OOo_3_0
I'm not sure it is up to date.
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
ptoye
Posts: 225
Joined: Mon Apr 21, 2008 11:07 am
Location: Reading, England

Re: How do I find filters for export?

Post by ptoye »

Brilliant. Thanks. It seems to have the filters I need, and they all support export. Now I'll try them out.

How do you manage to find these things?
Peter
OO 4.1.1 on MS Windows 7 64-bit
FJCC
Moderator
Posts: 9277
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: How do I find filters for export?

Post by FJCC »

ptoye wrote:How do you manage to find these things?
Too many hours having "fun" with this software.
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
ptoye
Posts: 225
Joined: Mon Apr 21, 2008 11:07 am
Location: Reading, England

Re: [Solved] How do I find filters for export?

Post by ptoye »

Ah....

I have to say that I find OOBasic the least "fun" language that I've ever had to deal with.
Peter
OO 4.1.1 on MS Windows 7 64-bit
ptoye
Posts: 225
Joined: Mon Apr 21, 2008 11:07 am
Location: Reading, England

Re: [Solved] How do I find filters for export?

Post by ptoye »

I tried out the PDF filter and it worked fine, so I assume the others will. Thanks again FJCC for your help.
Peter
OO 4.1.1 on MS Windows 7 64-bit
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: [Solved] How do I find filters for export?

Post by Villeroy »

ptoye wrote:Brilliant. Thanks. It seems to have the filters I need, and they all support export. Now I'll try them out.

How do you manage to find these things?
You can ask the software itself about its capabilities.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
ptoye
Posts: 225
Joined: Mon Apr 21, 2008 11:07 am
Location: Reading, England

Re: [Solved] How do I find filters for export?

Post by ptoye »

Thanks Villeroy. I don't speak Python - it was invented after I ave up serious programming. I sort of see what it's doing, but my main question to FJCC was how to find out which API function to call to get the information. The API documentation , as I've said many times here, is not exactly user-friendly. Once I knew it was com.sun.star.document.FilterFactory it was easy(ish). I think that if AOO (or LO) want to be taken seriously, they have to improve the level of documentation by an order of magnitude. Not easy, I know. But then software writing isn't easy either, it's just more fun.
Peter
OO 4.1.1 on MS Windows 7 64-bit
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: [Solved] How do I find filters for export?

Post by Villeroy »

Extract the module to <user_profile>/Scripts/python/ and run the code via Tools>Macros.... The running office suite will dump all information into a searchable spreadsheet document.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
ptoye
Posts: 225
Joined: Mon Apr 21, 2008 11:07 am
Location: Reading, England

Re: [Solved] How do I find filters for export?

Post by ptoye »

Wow! Thanks. But to be honest I prefer FJCC's solution. Less data but enough information, if you see what I mean.
Peter
OO 4.1.1 on MS Windows 7 64-bit
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: [Solved] How do I find filters for export?

Post by Villeroy »

ptoye wrote:Wow! Thanks. But to be honest I prefer FJCC's solution. Less data but enough information, if you see what I mean.
That list is a static list of 2007 (OpenOffice 3.0). My macro generates a complete filter list for any recent version of AOO and LibreOffice. Todays LibreOffice list of suported file formats is much larger.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
ptoye
Posts: 225
Joined: Mon Apr 21, 2008 11:07 am
Location: Reading, England

Re: [Solved] How do I find filters for export?

Post by ptoye »

Ah. I see. Thanks.
Peter
OO 4.1.1 on MS Windows 7 64-bit
searchingforpants
Posts: 1
Joined: Sat Jan 25, 2020 1:21 am

Re: [Solved] How do I find filters for export?

Post by searchingforpants »

Villeroy wrote:Extract the module to <user_profile>/Scripts/python/ and run the code via Tools>Macros.... The running office suite will dump all information into a searchable spreadsheet document.
Sorry to bring this thread back from the dead, but where can one download the the Python module you mention that dumps all available filters for export?
LibreOffice 6.3 on Windows 10
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: [Solved] How do I find filters for export?

Post by Villeroy »

Sorry for being heedless. I moved that thing to a separate topic in the snippets forum: Print properties of TypeDetection and FilterFactory
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Post Reply