Page 1 of 1

Simple field (w:fldSimple) disappears

PostPosted: Sat Jul 02, 2011 1:36 am
by Siempre
Hi Jason,

We managed successfully to integrate the docx4j library into some projects here, however there is something we would like to use that apparently is not supported.
There is an issue with Simple Fields (w:fldSimple).
Due to security reasons, I can't give you the full Word document, but I can give you the related xml sources :
  • header2_output.xml
    The complete header from the bound Word document
    (6.05 KiB) Downloaded 402 times
  • header2_input.xml
    The complete header from the OpenDoPE Word document
    (5.86 KiB) Downloaded 365 times

In the prepared template with OpenDoPE (header2_input.xml), this field works perfectly and the field is shown.
After the binding process (header2_output.xml), that simple field is simply gone from the xml.
We also noticed that the lines count is less after the binding than before.

Our goal with this simple field is to get the page number in a section.

We would like to know why or if we did something wrong.

Re: Simple field (w:fldSimple) disappears

PostPosted: Sun Jul 03, 2011 3:27 pm
by jason
Thanks for the report.

With 2.7.0 rc, and a w:fldSimple, I get a MarshallException trying to save the file (which is obviously different to the fldSimple being silently dropped).

I've added a workaround for this, rather than a fix for the underlying issue which will have to wait until post 2.7.0. See further