Issue/Fix
In class CTSignatureLine, the fields { signinginstructions, addlxml, sigprovurl } should each have the namespace attribute set to urn:schemas-microsoft-com:office:office in the @XmlAttribute annotation, as follows:
@XmlAttribute(name = "signinginstructions", namespace = "urn:schemas-microsoft-com:office:office")
protected String signinginstructions;
@XmlAttribute(name = "addlxml", namespace = "urn:schemas-microsoft-com:office:office")
protected String addlxml;
@XmlAttribute(name = "sigprovurl", namespace = "urn:schemas-microsoft-com:office:office")
protected String sigprovurl;
Without this mod, then [ loading, accessing, then saving a docx file ] creates a document where these attributes are lost. (For the signature system we use, this causes system-specific signature block configuration to be lost).
Note: signinginstructionsset (of similar name to signinginstructions) does not need this namespace - it gets propagated properly.
Note: It might be worth checking on whether the attributes { allowcomments, showsigndate } need a namespace also - these did not appear in my files. (All others do appear (and propagate) in my files - so the rest, not mentioned here, don't appear to need modding).
Example
''Attachments'' 😧 available at:
https://drive.google.com/folderview?id=0Byn_MBGknJhUQXlTZVpSUnBaRVk&usp=sharing
Attached are four files:
- source.docx - manuallycreated / contains a single signature block.
- result-without-mod.docx - loaded, accessed, saved without the above modification.
- result-with-mod.docx - loaded, accessed, saved with the above modification.
- Example.java - a simple app used to generate docs (2) and (3) from doc (1). (You will, of course, need to create/use docx4j jars with and without the mod to test).
If you pull up the document.xml component file of each docx and look at the attributes of the o:signatureline tag, you'll find that the attributes { o:signinginstructions, o:addlxml, o:sigprovurl } in the source document (1) do not appear in result document (2), while they do appear in result document (3). (Note that o:suggestedsigner does appear in all three - this attribute is already annotated with the namespace).
Also attached is a simple app used to test the generate the 'result' docs from the 'source' doc.
Other info:
- docx4j versions: Issue found in 3.0.1; Issue reproduced in current source (3.1.1-SNAPSHOT); Issue fix tested/worked in current source (3.1.1-SNAPSHOT).
- OS: Windows 7.
- IDE: Eclipse Kepler
Thanks
Issue/Fix
In class
CTSignatureLine, the fields {signinginstructions,addlxml,sigprovurl} should each have thenamespaceattribute set tourn:schemas-microsoft-com:office:officein the@XmlAttributeannotation, as follows:Without this mod, then [ loading, accessing, then saving a docx file ] creates a document where these attributes are lost. (For the signature system we use, this causes system-specific signature block configuration to be lost).
Note:
signinginstructionsset(of similar name tosigninginstructions) does not need this namespace - it gets propagated properly.Note: It might be worth checking on whether the attributes {
allowcomments,showsigndate} need a namespace also - these did not appear in my files. (All others do appear (and propagate) in my files - so the rest, not mentioned here, don't appear to need modding).Example
''Attachments'' 😧 available at:
https://drive.google.com/folderview?id=0Byn_MBGknJhUQXlTZVpSUnBaRVk&usp=sharing
Attached are four files:
If you pull up the document.xml component file of each docx and look at the attributes of the
o:signaturelinetag, you'll find that the attributes {o:signinginstructions,o:addlxml,o:sigprovurl} in the source document (1) do not appear in result document (2), while they do appear in result document (3). (Note thato:suggestedsignerdoes appear in all three - this attribute is already annotated with the namespace).Also attached is a simple app used to test the generate the 'result' docs from the 'source' doc.
Other info:
Thanks