CenterForOpenScience / pydocx

An extendable docx file format parser and converter
Other
186 stars 55 forks source link

Add support for textbox -> txbxContent #203

Closed kylegibson closed 8 years ago

kylegibson commented 8 years ago
      <w:r>
            <w:pict>
                <v:textbox>
                  <w:txbxContent>
                    <w:p>
                      <w:r>
                        <w:t>Foo bar baz</w:t>
                      </w:r>
                    </w:p>
                  </w:txbxContent>
                </v:textbox>
              </v:rect>
            </w:pict>
      </w:r>
kylegibson commented 8 years ago

Do you have any test cases for when textbox appears without the markup_compatibility? This would happen if you had a word document created in an older version of word that didn't support the markup compatibility syntax.

jlward commented 8 years ago

Do you have any test cases for when textbox appears without the markup_compatibility? This would happen if you had a word document created in an older version of word that didn't support the markup compatibility syntax.

I do not. I only have it with markup_compatibility because that was the only way I could get it to happen using libreoffice.

kylegibson commented 8 years ago

I only have it with markup_compatibility because that was the only way I could get it to happen using libreoffice.

What version of libreoffice?

jlward commented 8 years ago

What version of libreoffice?

5.1. And I don't have access to 4.x

kylegibson commented 8 years ago

5.1. And I don't have access to 4.x

Our vagrant boxes ship with 3.5. Although, ideally we would create the documents using an older version of Word. I wish we had access to Word VMs like we do with IE VMs.

jlward commented 8 years ago

Our vagrant boxes ship with 3.5. Although, ideally we would create the documents using an older version of Word. I wish we had access to Word VMs like we do with IE VMs.

Using 3.5 and saving as a docx actually removes the contents of the docx. So there's that.

winhamwr commented 8 years ago

Everything looks good now except for the paragraph nesting thing. It would be good to include Kyle in that decision, since I feel like I don't have a great understanding of what it would take to implement a fix.

winhamwr commented 8 years ago

I'll wait to review the description of the ticket to fix the nested paragraph before giving this one the ol' :+1:

jlward commented 8 years ago

I'll wait to review the description of the ticket to fix the nested paragraph before giving this one the ol' :+1:

213 has been created to deal with nested paragraphs.

caffodian commented 8 years ago

@kylegibson has reviewed #213 so this is good