Hello,
Apologies for the long silence on this one. We have re-tested the issue on the current release and would like to close it with a summary of where things stand.
Fixed in 26.9. The UnsatisfiedLinkError you reported in your first message has been fixed and is available in GroupDocs.Watermark for Java 26.9. It was caused by an internal packaging problem in the released jar that prevented native font-metrics calls from being resolved; it was unrelated to the layout changes, it just happened to appear in the same log.
The layout changes: confirmed, and a format limitation. We re-verified the behaviour on your TestWatermark.docx with 26.9. A locked watermark with AllowOnlyFormFields still restructures the document:
Before: 1 section, 45 paragraphs
After: 3 sections, 23 paragraphs / watermark section / 22 paragraphs
As Alexander explained earlier in this thread, Word applies “allow only form fields” protection per section, so the only way to protect the watermark while leaving the rest of the document editable is to move it into its own section — which means splitting the surrounding content. This is inherent to the Word format rather than something we can correct in the library, so we are closing WATERMARKJAVA-147 as a format limitation.
Put plainly: the three requirements — the watermark cannot be removed, the document stays freely editable, and the layout is untouched — cannot all hold at once in a .docx file. Any protection strong enough to prevent removal of the watermark is applied at section level and therefore changes the document structure.
One option that was not discussed in this thread. If the goal of locking is identification rather than strict prevention, WordProcessingLockType.AllowOnlyRevisions may suit you better than what you have now:
WordProcessingWatermarkPagesOptions options = new WordProcessingWatermarkPagesOptions();
options.setLocked(true);
options.setLockType(WordProcessingLockType.AllowOnlyRevisions);
We verified on your file that it leaves the document structure unchanged — still 1 section and 45 paragraphs, no alignment or pagination changes, and no highlighting of editable regions. The document remains editable, and if someone deletes the watermark that deletion is recorded as a tracked revision, so it is visible in the document. It does not make removal impossible, but it does make it traceable, which may be a better trade-off than the unlocked watermarks you are currently using.
If that turns out not to fit your workflow either, or if you would like us to look at the problem from a different angle, please let us know and we will be glad to continue.
Best regards