Error with soffice "MS PowerPoint 97" filter conversion

When I try to convert an Impress (.odp) file to an Power Point (.ppt) using soffice with the “MS PowerPoint 97” filter - I get the following error (/mnt/c/Rigal/TempC/TexStackAnswerBeamerToPPT/LaTeX/ it’s my working directory):

convert /mnt/c/Rigal/TempC/TexStackAnswerBeamerToPPT/LaTeX/test.odp -> /mnt/c/Rigal/TempC/TexStackAnswerBeamerToPPT/LaTeX/test.ppt using filter : MS PowerPoint 97
Overwriting: /mnt/c/Rigal/TempC/TexStackAnswerBeamerToPPT/LaTeX/test.ppt
Error: Please verify input parameters... (SfxBaseModel::impl_store <file:///mnt/c/Rigal/TempC/TexStackAnswerBeamerToPPT/LaTeX/test.ppt> failed: 0xc10(Error Area:Io Class:Write Code:16) /build/libreoffice-kHUbkE/libreoffice-7.3.0~rc3/sfx2/source/doc/sfxbasemodel.cxx:3202 /build/libreoffice-kHUbkE/libreoffice-7.3.0~rc3/sfx2/source/doc/sfxbasemodel.cxx:1775)

Strictly speacking I use this command line:

soffice --headless --convert-to ppt:"MS PowerPoint 97" test.odp

I found the filter name here (help.libreoffice.org/7.3).

Config
Ubuntu 18.04 LTS on Windows Subsystem Linux (WSL), detail below (obtained with lsb_release -a):
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.6 LTS
Release: 18.04
Codename: bionic
LibreOffice version (obtained with libreoffice --version): LibreOffice 7.3.0.3 30(Build:3)

Am I doing something wrong?

Have you tried to open the PPT directly in LibreOffice and then save it as ODP?

Thanks for your answer.
I tried only on Windows OS, when I do “Save as” with LibreOffice Impress, the “.ppt” extension is not proposed in the list of available extension. However it is proposed with OpenOffice Impress… So, currently I do the conversion with OpenOffice but I would like to automate the process and so I tried - without succes - with soffice in command line…

@Hrbrgr: the direction is not from PPT to ODP, it is the other way round.

@SylvainRigal:

  1. Your command line is correct, although contains redundancy. It should work. It might not work either if your ODP is not ODP (e.g., it’s ODG in disguise - having wrong extension), so it opens in another module, not Impress; or if your LibreOffice installation is damaged (e.g., related configuration is broken, or some files are missing); or maybe there’s some bug with specific file data (which then needs an issue in the bug tracker).
  2. There’s no need specifying this specific filter after ppt, since it is the default for that extension anyway, so this should be enough in normal case (but should work the same, so I don’t expect it to fix your case):
    soffice --headless --convert-to ppt test.odp
  1. There’s no need to specify --headless here (but it doesn’t hurt), because --convert-to implies it; so this should also work:
    soffice --convert-to ppt test.odp

Hm, that indeed suggest incomplete or broken installation. PPT is definitely supported in all releases.

I have just tried to install LO on my Ubuntu under WSL2 (using sudo apt install libreoffice), then used it to convert an ODP file to PPT, and it indeed worked as expected.

I need to learn reading. Indeed, it shows that there’s a problem in the process of writing, not something wrong with the configuration/installation. Taking “Overwriting: /mnt/c/Rigal/TempC/TexStackAnswerBeamerToPPT/LaTeX/test.ppt” into account, and knowing that the code means ERRCODE_IO_CANTWRITE, it just means that your old conversion can’t be overwritten (do you have some permission flags preventing the file from overwrite?)

2 Likes

Thanks a lot for your answer and clarifications.

I forgot to specify that before to post this topic I remove LibreOffice (with sudo aptitude purge libreoffice) and test in fresh install (also I will maybe try to test in a fresh WSL today also…).

Anyway, if I remove the old “test.ppt” file present and do (sorry to not have tested this first…):

   soffice --convert-to ppt test.odp

I obtain this error message:

Error: no export filter for /mnt/c/Rigal/TempC/TexStackAnswerBeamerToPPT/LaTeX/test.ppt found, aborting.
Error: no export filter

Then if I do:

soffice --convert-to ppt:"MS PowerPoint 97" test.odp

I obtain this:

convert /mnt/c/Rigal/TempC/TexStackAnswerBeamerToPPT/LaTeX/test.odp -> /mnt/c/Rigal/TempC/TexStackAnswerBeamerToPPT/LaTeX/test.ppt using filter : MS PowerPoint 97
Error: Please verify input parameters... (SfxBaseModel::impl_store <file:///mnt/c/Rigal/TempC/TexStackAnswerBeamerToPPT/LaTeX/test.ppt> failed: 0xc10(Error Area:Io Class:Write Code:16) /build/libreoffice-kHUbkE/libreoffice-7.3.0~rc3/sfx2/source/doc/sfxbasemodel.cxx:3202 /build/libreoffice-kHUbkE/libreoffice-7.3.0~rc3/sfx2/source/doc/sfxbasemodel.cxx:1775)

But when I tried with a very simple document created with LibreOffice Impress and named “test2.odp”:

$ soffice --convert-to ppt test2.odp
Error: no export filter for /mnt/c/Rigal/TempC/TexStackAnswerBeamerToPPT/LaTeX/test2.ppt found, aborting.
Error: no export filter
$ soffice --convert-to ppt:"MS PowerPoint 97" test2.odp
convert /mnt/c/Rigal/TempC/TexStackAnswerBeamerToPPT/LaTeX/test2.odp -> /mnt/c/Rigal/TempC/TexStackAnswerBeamerToPPT/LaTeX/test2.ppt using filter : MS PowerPoint 97

The second command works fine and it well converts the file into “.ppt”.

It’s strange I don’t get the same behaviour as you when no filter is explicity passed…

And have you an idea why OpenOffice Impress would be able to convert my file and not soffice ?

Then you need to specify what “fresh install” might mean - did you use a PPA, or a TDF-provided DEBs, or did you build yourself?

Sorry, I install it with the sudo apt-get install libreoffice.
I don’t know if it answer your question because I don’t know theses terms “PPA”, “TDF…”, etc. I’m sorry for that too…

Ok I tested with two new WSL Ubuntu LTS 18.04 LTS and 20.04 and obtain the same results.

I think your first intuition was the good one:

Indeed, my “odp” file was created by unoconv from an ''odg" file with this command:

unoconv -f odp test.odg

When I try to open this file with LO Impress, it automaticly redirect to Draw…

If I create a simple file called “test2.odp” with LO Impress - which is succesfully converted into ppt with soffice (see my older response above) - and then:

  1. Export it to pdf with libreoffice.
  2. Convert it into “odg” with libreoffice --headless --convert-to odg test2.pdf
  3. Convert it into “odp” with unoconv -f odp test2.odg
  4. Finally convert it into ppt with soffice --convert-to ppt:"MS PowerPoint 97" test2.odp

And this time I got the same error as usual ("Code 16", see my older responses above).

So, the problem is probably the unoconv conversion…

But why I can well convert it to “ppt” with OO and not with soffice?
Have you, by chance, an idea of a way to convert it with OO in command line too?

I’m really interrested in a command line conversion and not a “Save as” because I need to automate the process… If the “Save as” is done by command line it’s also ok for me…

I should told you about unoconv earlier but I didn’t expect it would change anything… I’m sorry for that.

Please attach a sample ODP from unoconv for testing.

Here the files:

  • test2InitialLO.odp” is the “odp” file created with LO Impress and then exported into pdf with LO Impress (no command line used).
  • test2FromPdf.odg” is the “odg” file created with the command libreoffice --headless --convert-to odg test2.pdf.
  • test2Unoconv.odp” is the output “odp” file created with the command unoconv -f odp test2.odg

test2InitialLO.odp (16.1 KB)

test2FromPdf.odg (18.5 KB)

test2Unoconv.odp (19.1 KB)

(I can’t put more than 2 links because I’m new to this “forum”)

Thanks; the unoconv clearly produces invalid files. The “ODP” it produced contains wrong information in the package’s mimetype (it should be application/vnd.oasis.opendocument.presentation for ODP, while it is application/vnd.oasis.opendocument.graphics in the problematic file); that matches the <office:drawing> element in the content.xml. Changing the two files content manually, and opening the result in LO, still shows some remaining problems (a warning about corrupt file is shown), but the file opens in Impress this time.

AOO is completely wrong in this case trying to open that invalid file in Impress; and not showing the corruption warning in AOO is expected, since I myself added the warning in LO some time ago to avoid user falsely believing their corrupt files are fine. What can I say - just file a bug report to unoconv.

1 Like

The problem here is the invalid “ODP” file generated by unoconv.
However, if your task is converting PDF to PPT, then the complexity with conversion of PDF to ODG, then ODG to ODP, then ODP to PPT is not needed: you only need one tool (LibreOffice), and one command:

soffice --infilter=impress_pdf_import --convert-to ppt path/to/file.pdf

This uses the proper import filter to load the PDF to Impress, so it can export to PPT from the start.

If you really want to convert those invalid "ODP"s, you still can do that - again, by specifying the import filter explicitly:

soffice --infilter=impress8 --convert-to ppt path/to/file.odp
1 Like

This is wonderfull thanks a lot!

The command soffice --infilter=impress8 --convert-to ppt path/to/file.odp works like a charm !

However, the command soffice --infilter="PDF - Portable Document Format (Impress)" --convert-to ppt path/to/file.pdf still doesn’t work for me on a fresh WSL Ubuntu 20.04 LTS with LibreOffice 7.3.0.3 30(Build:3).

It’s OK to continue with the “PDF - Portable Document Format (Impress)” here. Please post the error.

I get the following error:

$ soffice --infilter="PDF - Portable Document Format (Impress)" --convert-to ppt test.pdf
Error: no export filter for /mnt/c/rigal/temp/TexStackAnswerBeamerToPPT/LaTeX/test.ppt found, aborting.
Error: no export filter
$ soffice --infilter="PDF - Portable Document Format (Impress)" --convert-to ppt:"MS PowerPoint 97" test.pdf
convert /mnt/c/rigal/temp/TexStackAnswerBeamerToPPT/LaTeX/test.pdf -> /mnt/c/rigal/temp/TexStackAnswerBeamerToPPT/LaTeX/test.ppt using filter : MS PowerPoint 97
Error: Please verify input parameters... (SfxBaseModel::impl_store <file:///mnt/c/rigal/temp/TexStackAnswerBeamerToPPT/LaTeX/test.ppt> failed: 0xc10(Error Area:Io Class:Write Code:16) /build/libreoffice-crGbO6/libreoffice-7.3.0~rc3/sfx2/source/doc/sfxbasemodel.cxx:3202 /build/libreoffice-crGbO6/libreoffice-7.3.0~rc3/sfx2/source/doc/sfxbasemodel.cxx:1775)

Even with a simple pdf it doesn’t work (same error)…

I do repro the problem under WSL (but not with LO on Windows - by the way: why do you need WSL I’m curious?); I’m going to check which package is missing there.

Something strange here; I don’t know why the difference, but it works there on Ubuntu with another import filter name:

soffice --infilter=impress_pdf_import --convert-to ppt path/to/file.pdf
1 Like

I don’t know why the difference, but

Oh lol. I myself wrote:

Also File Conversion Filters Tables needs correcting: it does not clarify which of the columns should be used in the command line (it is named “File Conversion Filter Names”, and has “Filter Name” column - so it would be natural for user to assume that this column has the wanted string - while in fact, the correct value is in the “API Name” column).

And I fell a wictim of this exact error :slight_smile: I used a “Filter Name”, while I needed “API Name”, which worked fine. Fun that Filter Name still worked on Windows…

1 Like