Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DocX doesn't read out the "app.xml" #21

Open
marcscheuner opened this issue Mar 21, 2016 · 5 comments
Open

DocX doesn't read out the "app.xml" #21

marcscheuner opened this issue Mar 21, 2016 · 5 comments

Comments

@marcscheuner
Copy link

Unfortunately, DocX currently doesn't read out the "app.xml" file that does exist for a lot of *.docx files in the "/docProps" subfolder (side-by-side with "core.xml", which is being read out).

I would really love to have access to the information like count of words, count of characters etc. that is stored in the "app.xml" - it seems to me, it would be almost the same code as for the "CoreProperties" property on the "DocX" object. Can't be that hard to do! :-) Any hope that'll show up soon?

@PrzemyslawKlys
Copy link
Contributor

Since you're already after discovery process this would be nice starting point for your first commit :)

@PrzemyslawKlys
Copy link
Contributor

Unfortunately I believe there is not much sense in this. Most likely only couple of apps save that information, and if you edit that document via DocX you won't get that updates. You would need to implement tracking system for that as well. While counting words may be easy enough, counting lines is a bit harder. There's a lot of possible "can go wrong" scenarios here for little effort. And your solution would be relying only on the app.xml which may be wrong if not updated by app that last touched the docx file. I guess it would be better to implement full count of words, chars etc by yourself and built it in.

@marcscheuner
Copy link
Author

Well, _WORD_ would update it for sure !

I don't want to implement support for this when creating your own ".docx" files - but when you open an existing ".docx" file from Word, I would love to see those values be available to my code!

@PrzemyslawKlys
Copy link
Contributor

There would still be inconsistency and you would expect the data to be proper all the time, not only if "Word" updates it. And word would only update it if you open it, and save.

@PrzemyslawKlys
Copy link
Contributor

Feel free to update the code and submit patch. But please take that into consideration, and add additional notes to the code explaining that. I just feel there may be people using this functionality and getting not expected results blaming code for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants