docx-rs icon indicating copy to clipboard operation
docx-rs copied to clipboard

Is there any progress on Textbox?

Open oonxt opened this issue 1 year ago • 3 comments

I noticed this:

https://github.com/bokuweb/docx-rs/blob/6fdf81d1baa71091988099ca899f5df85e9b4cf3/docx-core/src/documents/elements/drawing.rs#L147

And impl for Textbox is commented.

Is there a plan to support this feature?

oonxt avatar Oct 17 '24 09:10 oonxt

Hey, mind a PR? If you are motivated enough, it would be great contribution!

xamgore avatar Oct 21 '24 08:10 xamgore

I have very little knowledge about Office Open XML. And I found something on this website: http://officeopenxml.com/drwSp-textbox.php

Should I refer to this specification to implement it?

oonxt avatar Oct 22 '24 13:10 oonxt

The site is not an exhaustive explication of the OOXML specification. I cover what I believe a majority of those working in English-speaking countries would need to know, but certainly there is much that is omitted. This is just a slice.

The official website provides outdated 4-th edition specs, Github has 5-th. Reading PDF files is uncomfortable for me, I would stick with another website:

The repository contains text_box.rs with some fields already defined. If the struct looks complete enough for you, check the BuildXML trait implementation, then reuse it in the src/documents/elements/drawing.rs:147. One unit test, one integration test, and I think that's all.

xamgore avatar Oct 22 '24 16:10 xamgore