Page 1 of 1

Docx Rendered Twice

PostPosted: Mon May 24, 2021 2:57 pm
by atifhashmi
Hi All,

I am working on creating a Word document using Docx4j that includes a table. The problem that I am having is that once the Word document is created and I open it, the same content is rendered twice i.e., the document is rendered twice. I have spent a bunch of time using the WebApp to debug the issue but have not been successful. I have attached the Word document here.

When you open this Word document you will see 4 pages. However, when you scroll all the way to the bottom and back up a few times, the document will reduce to 2 pages. It is supposed to be a 2 page document.

I will appreciate any help.

Thanks,

Re: Docx Rendered Twice

PostPosted: Wed May 26, 2021 7:59 pm
by jason
What are you using to open the docx? When I open it in Word it seems OK. And when I look at the XML, I don't notice anything strange.

Re: Docx Rendered Twice

PostPosted: Fri May 28, 2021 10:32 am
by atifhashmi
Thanks for the reply, Jason.

I am using the latest version of Microsoft Word to open the docx.

I downloaded the file attached with my original post and for me, I had to click on "Enable Editing" to reproduce the problem. Before I click "Enable Editing," I see 2 pages. After I click "Enable Editing," I see 4 pages. Where the first two pages are repeated twice. The docs should have only 2 pages.

Can you let me know if you see the erroneous behavior after clicking "Enable Editing?" I looked into the XML as well and was not able to figure out why the document shows 4 pages instead of 2.

I very much appreciate your help.

Re: Docx Rendered Twice

PostPosted: Sat May 29, 2021 7:10 am
by jason
Are you using Word Online? I am using Word on Windows; editing is enabled, I don't have to click anything to enable it.

Could you please download the docx you attached to this thread to confirm the problem is actually present for you?

Re: Docx Rendered Twice

PostPosted: Sat May 29, 2021 7:35 am
by atifhashmi
I am not using Word Online. I am running MS Word on my computer.

I downloaded the docx attached to my original post and verified that the problem is still present for me.

Some times when I scroll-up and down, the docx automatically reduces from 4 pages to 2 pages though.

Re: Docx Rendered Twice

PostPosted: Thu Jun 03, 2021 1:17 am
by atifhashmi
Hi Jason,

Just wanted to see if you were able to see the issue with the docx that I uploaded with my original email. I have looked through the various xml files that are part of the docx and still haven't been able to determine the cause of the issue.

Thanks,