1

I would like to convert/export .pptx file into pdf but seems like it's not possible on Linux;

I tried using the python pptx library but the max it do is to extract the text from powerpoint file

from pptx import Presentation

prs = Presentation("myfile.pptx")

# text_runs will be populated with a list of strings,
# one for each text run in presentation
text_runs = []

for slide in prs.slides:
    for shape in slide.shapes:
        if not shape.has_text_frame:
            continue
        for paragraph in shape.text_frame.paragraphs:
            for run in paragraph.runs:
                text_runs.append(run.text)

I would like to simply transform the file to pdf... does someone know how to do it in an easy way?

Regards, Leonardo

Leonardo Ferreira
  • 673
  • 1
  • 6
  • 22
  • 1
    Hey @KJ, thanks for your contribution, mate. Yeah, yesterday after my post I did find a way to convert the files by using the libreoffice command line; It is still needing some fine-tuning but it works – Leonardo Ferreira Aug 03 '22 at 13:22

0 Answers0