Skip to content

feature: Font.cs_size #248

Open
Open
@ZvikaZ

Description

@ZvikaZ

Hi.
Please see the attached file.
snippet1.docx

It has two lines (in Hebrew), first line is size 11 in Word, second line is size 10 in Word.
When parsing it with the following code:

import docx

doc_file_name = 'snippet1.docx'
word_doc = docx.Document(doc_file_name)

runs = []
for (paragraph) in word_doc.paragraphs:
    for (run) in paragraph.runs:
        if run.text.strip():
            print run.text, run.style.style_id, "bold:", run.bold, "size:", run.font.size

It prints:

 אב  s01 bold: None size: None
 האהבה העליונה  s01 bold: None size: None

I tried to compare both 'run's in debugger, and couldn't find anything that tells the size difference between them.

Please help...
Thanks,
Zvika

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions