I am printing from a .pptx but the single sentences are split into new lines in between from somewhere ..Here is the screenshot from a slide..
When reading through below code.. from pptx import Presentation
prs = Presentation(path_to_presentation)
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:
print(run.text)
Getting output like below...
Books include:
Learning Python
by Mark Lutz
Python Essential Reference
by David Beazley
Python Cookbook
, ed. by Martelli, Ravenscroft and Ascher
(online at http://code.activestate.com/recipes/langs/python/)
http://wiki.python.org/moin/PythonBooks
You can compare the screenshot fro pptx and the printed text from pptx , bullet points are getting split into two or more sentences ..Like "Learning Python by Mark Lutz" printing in 2 points "Learning Python" and "by Mark Lutz" and even bullets are getting missed.
How to fix this issue?