Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export to PDF #12

Open
timhoffm opened this issue Oct 13, 2019 · 1 comment
Open

Export to PDF #12

timhoffm opened this issue Oct 13, 2019 · 1 comment

Comments

@timhoffm
Copy link
Owner

Add a method to Template:

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.
@fahro
Copy link
Contributor

fahro commented Oct 13, 2019

#18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants