Error with soffice "MS PowerPoint 97" filter conversion

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

Sorry for yesterday, I reached the maximum responses for my fisrt day and had to wait 15h before writting another response…
It appends just at the moment you gave me the final working solution XD !

So, your last command line works fine for me too (lets call this solution : method 1):
soffice --infilter=impress_pdf_import --convert-to ppt path/to/file.pdf

If you are interrested in some feedback, it seems that the conversion from PDF to PPT is a bit better when it’s done in several steps (PDF->odg + Unoconv:odg->odp + odp->ppt) (lets call this solution : method 2) because as you can see in the attached files, the parenthesis are not showed in equation in slide 3 but a ? symbol is present instead when converted with the one step command.

It’s not a problem for me. Your solution with a one line step is perfect.

I try to do this since more than six month I think and you solve it yesterday ! Thanks

About the WSL, just for this conversion it would be ok to do it on Windows but this conversion is part of a larger sequence that I prefer to automate on Linux rather than Windows… But even this larger sequence could be automate on windows but I got used to automate things on Linux because I found the code more friendly and a lot of very usefull inline tools are not available on WIN especially when it comes to LaTeX programming and .tex file conversion (pandoc, htlatex, etc.).

I work actually on the possibility to convert Beamer (LaTeX) to PPT in order to give something editable for people who don’t use LaTeX. Libreoffice PDF to PPT is the best way I found after a long time of research !

Here the initial PDF generated with Beamer (in attachment the ppt generated by the two methods):
Method1.ppt (99 KB)


Method2.ppt (98.5 KB)

1 Like

Thanks for the feedback!

I don’t see that in your attached files (or I don’t know where to look for that). It would be nice if you marked the place on the screenshot you attached instead of PDF.

However, actually better would be if you file a bug report with a sample PDF which gives wrong characters in specific place when converting the formats - that would allow to find and fix the problem, instead of keeping relying on multi-step conversion forever :slight_smile:

Of course, using Linux for automation is fine - I was just curious why the WSL (in fact, LibreOffice on WSL is completely untested scenario :slight_smile: ) - but yes, it makes perfect sense :slight_smile:

Ok so my mistake maybe…
This is what I obtain with screenshot:
Method1 (little boxed ? present and no parenthesis):

Method2 (no little ? but no parenthesis also):

Also you can see that in both conversion the square root (just after “S=”) below was not well printed…

Do I need to file two bug reports?

Correction: if I open the files with Impress there is no boxed ?. It is just PowerPoint who interpret strange character as ? but just on one file (not both).

Thanks; please file one bug.

Interesting, if exporting to PPTX also gives that.

I filled a bug report here.

Thanks again for your time !