[Python] Libreoffice excel to pdf conversion problem

Discussão em 'Python' iniciado por Stack, Março 17, 2025.

  1. Stack

    Stack Membro Participativo

    When I am trying to run this code on an excel document:

    import subprocess

    subprocess.run(['libreoffice', '--headless', '--convert-to', 'pdf',
    'test_docs/doc.xls', '--outdir', 'tmp_docs'])


    My document splits by width on 2 pages with the second page as shown below: (https://i.sstatic.net/LRaPbvwd.png)

    Why would this happen and how to fix this?

    Continue reading...

Compartilhe esta Página