You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def save_pdf(self, filename):
~~
Since `python-pptx` does not provide this capability. We need to rely on external programs (LibreOffice and/or PowerPoint).
LibreOffice can be used on the command line with
libreoffice --headless --convert-to pdf --outdir . filename.pptx
Tasks:
1. Check if LibreOffice is available on the system, if not fail
2. Create a temporary directory and save the tempate there as ´pptx`.
3. Run the above command in the temporary directory and target the output dir the user wants.
4. Cleanup
Optional:
Extend this to work with PowerPoint as well. Way of interaction with PowerPoint to be defined. I don't know if it can be controlled via command line.
The text was updated successfully, but these errors were encountered:
Add a method to
Template
:libreoffice --headless --convert-to pdf --outdir . filename.pptx
The text was updated successfully, but these errors were encountered: