Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm attempting to come up with some means of converting .pptx files to a pdf format from the command line. I have set up a cups-pdf printer to which I can actually send jobs, and so far I have it boiled down to the following command:

libreoffice -pt PDF somePowerpointFilePath.pptx

where PDF is the name of my printer. As is, however, libreoffice prints my documents in portrait orientation when I would like to use landscape.

I've taken a look at these questions, but none of them seem to suit my needs here.
Printing from the command line with LibreOffice, lpr commands?
How do I convert this filetype to pdf?
I have also read about the unoconv options, but I'd rather not have to play with my Python libraries to get this set up.

I also noticed the --convert-to option for the libreoffice command, but it is not behaving how I expect it to. I expect to be able to use that by libreoffice --convert-to pdf myFileName.pptx, but this command runs in no time at all (telling whenever you're working with libreoffice), and doesn't appear to deposit any sort of pdf file in the current working directory (as it is supposed to according to the man page).

If anyone can shed any light on how to get either of these two approaches working (printing through cups or using the --convert-to option), I would appreciate it.

share|improve this question
    
sometimes this will help you. –  Renju Chandran chingath May 19 at 9:00
    
I can achieve what you describe by means of libreoffice --headless --convert-to pdf mystuff.pptx; lp -d myprinter -o landscape mystuff.pdf. You should thus give us something more, dmesg output, error messages, log files, in order to understand what is going on. I repeat, these commands work perfectly on my system. –  MariusMatutiae May 20 at 9:07
    
Well, I can't replicate the issue (in my defense, 23 days). Thanks very much for the bounty and helpful comments, but I seem to be able to use echo *.pptx | xargs -L 1 libreoffice --headless --convert-to pdf {}, without need for the second step of printing the file again with lp to correct orientation. It was probably an idiotic mistake on my end, specifying some of the syntax incorrectly for libreoffice. What's the best etiquette for closing this question in this situation? Should I delete it? If I have a guess as to what I was doing wrong, should I post it as an answer? –  matthugs May 22 at 14:40
    
@matthugs Yes, you are encouraged to post answers to your own question if you have one. –  Jason May 22 at 20:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.