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

Reader/writer for Comments and Track-changes document parts #622

Closed
rvanlaak opened this issue Sep 15, 2015 · 14 comments
Closed

Reader/writer for Comments and Track-changes document parts #622

rvanlaak opened this issue Sep 15, 2015 · 14 comments

Comments

@rvanlaak
Copy link

rvanlaak commented Sep 15, 2015

The document graph also contains comments and track changes. We would like to be able to also read those, so we can deduct statistics from it:

https://msdn.microsoft.com/en-us/library/bb266220(v=office.12).aspx

Can't find much info about why it isn't there, no issues related to comments or track changes can be found. If you guys tell me where to start then I'll try to make a PR for the Reader part.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@christopher-francisco
Copy link

Hello, did you manage tu turn on track changes in a document from PHPWord?

@rvanlaak
Copy link
Author

rvanlaak commented Dec 16, 2016

Yes, you can do that by editing word/settings.xml. The track changes is related to w:proofState and w:trackRevisions. If you set w:val to false for the latter that will turn it off.

Other interesting settings are w:spelling and w:grammar, which you can set to dirty to for instance re-enable all spelling checks.

You can edit w:revisionView in order to change what types of revisions are shown to the user.

@christopher-francisco
Copy link

@rvanlaak thanks for your fast response, really appreciate it :)

Can you point me to any type of documentation or resource regarding this xml file? I'm not sure if it is related to the OOXML standard or something else (I'm kind of new to editing word documents from PHP 😅 )?

@rvanlaak
Copy link
Author

The OOXML specs are documented quite decently, maybe this gives you some info already: http:https://officeopenxml.com/anatomyofOOXML.php

Otherwise try MSDN https://msdn.microsoft.com/en-us/library/documentformat.openxml.wordprocessing.proofstate(v=office.14).aspx

@christopher-francisco
Copy link

@rvanlaak Thanks for the links. Are you sure the "Track Changes" is related to w:proofState? I can only find info on grammar and spell checking on every site :(

@rvanlaak
Copy link
Author

@christopher-francisco
Copy link

Thanks, I found this blog post in case anybody needs more info: http:https://openxmldeveloper.org/discussions/formats/f/13/p/800/2032.aspx#2032

@christopher-francisco
Copy link

Ok so, since there is no reader/writer for tracking changes, I'll try making one and submit a PR

@christopher-francisco
Copy link

@rvanlaak Hello, I just submitted PR #966 that solves this. It has about 3 TODOs regarding documentation, which I need some help, if possible.

Also, I don't know the maintainers, so if you could mention them, that'd be nice 😄

@troosan
Copy link
Contributor

troosan commented May 21, 2017

@rvanlaak @chris-fa FYI, I submitted a PR (#1059) that allows you to add comments in a docx document.

@troosan
Copy link
Contributor

troosan commented Jul 7, 2017

@chris-fa Thanks for the PR, it's a nice job but I have since refactored the writer/reader for the settings.xml file so I will not merge your PR, but but feel free to check the new code. I think it should be even easier now to add new values to the settings.
Please check PhpOffice\PhpWord\Metadata\Settings

@rvanlaak
Copy link
Author

rvanlaak commented Jul 7, 2017

@troosan can @chris-fa maybe rebase it against your rewrite then? Where could we find that?

... or do you mean that the rewrite includes all the features provided by this MR already?

@troosan
Copy link
Contributor

troosan commented Jul 7, 2017

@rvanlaak @chris-fa I'm doing it
I will implement
w:trackRevisions
w:doNotTrackMoves
w:doNotTrackFormatting
w:proofState
w:zoom

@troosan
Copy link
Contributor

troosan commented Jul 7, 2017

please check PR #1098

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

Successfully merging a pull request may close this issue.

3 participants