Ask Your Question

pdf to ppt and excel

asked 2019-03-06 12:33:46 +0200

binita gravatar image

i was trying to convert pdf to ppt and excel and i am able to generate ppt in the directory but its empty

command used soffice --convert-to pptx:"Impress MS PowerPoint 2007 XML" /4/1.pdf --outdir /4/

tried libreoffice command also

i want pptx, ppt, xls, & xlsx output any help will be great

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2019-03-06 13:18:24 +0200

updated 2019-03-06 15:33:56 +0200

To convert any file to a set format, LibreOffice does these things:

  1. Open the file - using either import filter defined in the command (if any), or auto-detected import filter. Note that the import filter defined which LO component (Writer, Writer/WEB, Calc, Draw, Impress) would be used to open the document.
  2. Ask the component that opened the file to export, using defined export filter (if any), or just using a default export filter for wanted extension.

At the stage 2, if the export will succeed or not depends on if the active module has the relevant export filter or not. So - it's crucial that at stage 1, a correct module was opening the file, which can later export it to desired format.

And in the absence of explicit import format specification in the command line, what would open PDFs in LO? You may try it yourself: soffice sample.pdf would open Draw. Now try to export the result to PPTX... you won't see such an item in Save To, nor in Export. What would you do to be able to do that using GUI? You would need to open the file using Impress first, thus selecting PDF - Portable Document Format (Impress) in File Open dialog.

The same needs to be done using command line. You need to use --infilter parameter here, like this:

soffice --infilter="impress_pdf_import" --convert-to pptx:"Impress MS PowerPoint 2007 XML" --outdir /4/ /4/1.pdf

In this case, even explicit specification of export filter could be redundant, and this simplified variant would also work, because it's default for Impress to export to PPTX:

soffice --infilter="impress_pdf_import" --convert-to pptx --outdir /4/ /4/1.pdf

All import filters are listed under org.openoffice.TypeDetection.Filter/Filters in OptionsLibreOfficeAdvancedExpert Configuration; they have entries like org.openoffice.TypeDetection.Filter:Filter['impress_pdf_import'], so you can get the proper name to use in command. For PDF import to Writer, the filter is named writer_pdf_import; and for Calc, there's no PDF import filter.

edit flag offensive delete link more


yes worked thanks what about excel & docx??. we have to use ??

binita gravatar imagebinita ( 2019-03-06 13:30:38 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2019-03-06 12:33:46 +0200

Seen: 2,591 times

Last updated: Mar 06 '19