Page 1 of 1

docx4j online code generation cannot generate the code

PostPosted: Mon May 25, 2015 8:16 pm
by vyongjay
Indeed, this feature is very useful. I've tried upload my doc template and processed the file. All went well.
The tool showed all as expected.

But when I click on the first w:p link as suggested to generate the code, it showed this:

No results for /w:document[1]/w:body[1]/w:p[1]


I tried to find whether the other may have the same problem but no luck.

Please suggest :)

Re: docx4j online code generation cannot generate the code

PostPosted: Mon May 25, 2015 11:22 pm
by jason
If you unzip your docx, and look at word/document.xml, what does the first w:p contain?

Re: docx4j online code generation cannot generate the code

PostPosted: Tue May 26, 2015 2:52 am
by vyongjay
The first w:p after unzipping the file is :

<w:p w:rsidR="000F7E90" w:rsidRPr="00AC49F1" w:rsidRDefault="00B10E40" w:rsidP="00AC49F1"><w:bookmarkStart w:id="0" w:name="_GoBack"/>

Hope it can tell some clue.

Thanks a lot. Very glad to see your response :)

The template actually contains a picture of barcode, which resides in the textbox again (since I need barcode and the description below)

If you need the file I could send it to you. Just let me know

Thank you again for your kindly help :)

Re: docx4j online code generation cannot generate the code

PostPosted: Tue May 26, 2015 9:15 am
by jason
That's not a complete w:p. Is the w:p end tag straight after the w:bookmarkStart?

Re: docx4j online code generation cannot generate the code

PostPosted: Tue May 26, 2015 2:20 pm
by vyongjay
ืno. It still contains slightly more tags. Here I put the whole w:p from document for you to investigate.
For w:r, I group them up so you can read it easier.

I also attach the original docx file in case you need to see it all.

Code: Select all
<w:body>
<w:p w:rsidR="000F7E90" w:rsidRPr="00AC49F1" w:rsidRDefault="00B10E40" w:rsidP="00AC49F1">
   <w:bookmarkStart w:id="0" w:name="_GoBack"/>
   <w:bookmarkEnd w:id="0"/>
   <w:r w:rsidRPr="00B10E40">...</w:r>
   <w:r w:rsidRPr="00B10E40">...</w:r>
   <w:r w:rsidRPr="00B10E40">...</w:r>
   <w:r w:rsidRPr="00B10E40">...</w:r>
   <w:r>...</w:r>
   <w:r>...</w:r>
   <w:r>...</w:r>
   <w:r w:rsidR="00AC49F1">...</w:r>
</w:p>
.
.
.


Thank you so much :)

Re: docx4j online code generation cannot generate the code

PostPosted: Tue May 26, 2015 4:23 pm
by jason
I uploaded your docx, clicked on the first w:p, and it generated code as expected.

Re: docx4j online code generation cannot generate the code

PostPosted: Tue May 26, 2015 8:15 pm
by vyongjay
Yeah! It does what expected really now.

I don't know why at that time I couldn't generate the code.
I did try more than 3 times kept uploading and clicked on w:p but the result was that I showed you.

Thank you for your stay and solving the case with me. Very appreciated. Thank you!! :D