Skip to content Skip to sidebar Skip to footer

Print Powerpoint Slide With Python-pptx

I've been using python-pptx to access slides (I find it much smoother than using win32 as it doesn't need to open the Powerpoint window. However, I've checked the docs but can't fi

Solution 1:

python-pptx (purposely) does not have a PowerPoint renderer, and so cannot print slides (render them to paper/PDF). It also can't save as PDF, save as JPG, or do anything else that requires rendering (such as automatically shrink text to fit into a particular region).

The rationale is basically one of scope and focus. A renderer is a complex piece of software all on its own, and is only weakly coupled to a (headless) PPTX file editor, which is what python-pptx is. A renderer also has tight coupling to the display platform, which is not well supported in Python, getting things like font-metrics and so forth over the various operating systems like OS X, Linux, and Windows, perhaps depending on display and/or printer drivers, etc.

Post a Comment for "Print Powerpoint Slide With Python-pptx"