I’m trying to export pptx files to pdf using Libre office 24.8 in Ubuntu
I have some large pptx files that appear corrupted when open with the GUI, but when accepting the repair prompt, they open correctly.
Now if I run “libreoffice24.8 --convert-to pdf my_file.pptx”
It crashed saying it can’t open source file. How can I tell libreoffice to try to repair the file before crashing and exiting ?
There is no command line option for that. But you may easily do that using a macro - there is RepairPackage
property of MediaDescriptor
service.
Thanks !
I’m not familiar with open office macros.
It seems the synthax should be something like
libreoffice "macro:///Library1.Module1.myMacro(filename.pptx)"
But what should the macro look like ? And will changing the RepairPackage Property ensure that this file will be repaired if needed when opened ? For example when trying to convert with gotenberg, which uses unoconv under the hood ?
pptx is not a native file format to LibreOffice. Get some Windows PC with MS Office and some PDF printer being installed.
Print the document(s) to the PDF printer.
"c:\program files\microsoft of fice\office12\POWERPNT.exe" /PT “PrinterName” “” “” "MyFile.pptx"