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
class Paragraph in presentation could'n been used, there has a wrong:'_Paragraph' object has no attribute 'bullet'.
my run_demo is:
`from utils import *
from pptx import Presentation
from pptx.text.text import Font
from presentation import Paragraph,StyleArg
prs = Presentation("/Users/meiguihua/Documents/组会汇报/try1.pptx")
2. 获取第一页幻灯片的第一个文本框
slide = prs.slides[0]
textbox = next(shape for shape in slide.shapes if shape.has_text_frame)
class Paragraph in presentation could'n been used, there has a wrong:'_Paragraph' object has no attribute 'bullet'.
my run_demo is:
`from utils import *
from pptx import Presentation
from pptx.text.text import Font
from presentation import Paragraph,StyleArg
prs = Presentation("/Users/meiguihua/Documents/组会汇报/try1.pptx")
2. 获取第一页幻灯片的第一个文本框
slide = prs.slides[0]
textbox = next(shape for shape in slide.shapes if shape.has_text_frame)
3. 处理第一个段落
paragraph = textbox.text_frame.paragraphs[0]
para_obj = Paragraph(paragraph=paragraph, idx=0) # idx为段落序号
style_args = StyleArg(
paragraph_id=True, # 是否显示段落ID
element_id=True, # 是否显示元素ID
font_style=True, # 是否保留字体样式
)
html_output = para_obj.to_html(style_args)
print("生成的HTML:\n", html_output)`
The text was updated successfully, but these errors were encountered: