Comments (6)
I had a look at at this special case an observed following reformatting of the XML, which might cause the problem. Other changes in the XML do not affect MergeFields.
was - valid for processing with xdocreport (freemarker):
<w:p w:rsidR="00961FEC" w:rsidRPr="00E8332D" w:rsidRDefault="00E4009A" :rsidP="00D52AAA">
<w:pPr>
<w:ind w:left="-550"/>
<w:rPr>
<w:rFonts w:cs="Arial"/>
<w:sz w:val="10"/>
<w:szCs w:val="22"/>
</w:rPr>
</w:pPr>
<w:r>
<w:fldChar w:fldCharType="begin"/>
</w:r>
<w:r w:rsidR="00327443">
<w:instrText xml:space="preserve"> MERGEFIELD "#foreach($i in [0..$all])" \* MERGEFORMAT </w:instrText>
</w:r>
<w:r>
<w:fldChar w:fldCharType="separate"/>
</w:r>
<w:r w:rsidR="00327443">
<w:rPr>
<w:noProof/>
</w:rPr>
<w:t xml:space="preserve">«#foreach($i in </w:t>
</w:r>
<w:r w:rsidR="00327443">
<w:rPr>
<w:noProof/>
</w:rPr>
<w:lastRenderedPageBreak/>
<w:t>[0..$i»</w:t>
</w:r>
<w:r>
<w:fldChar w:fldCharType="end"/>
</w:r>
</w:p>
after saving again (only adding a whitespace) - NOT valid for processing with xdocreport (freemarker):
<w:p w:rsidR="00961FEC" w:rsidRPr="00E8332D" w:rsidRDefault="00934AF1" w:rsidP="00D52AAA">
<w:pPr>
<w:ind w:left="-550"/>
<w:rPr>
<w:rFonts w:cs="Arial"/>
<w:sz w:val="10"/>
<w:szCs w:val="22"/>
</w:rPr>
</w:pPr>
<w:fldSimple w:instr=" MERGEFIELD "#foreach($i in [0..$all])" \* MERGEFORMAT ">
<w:r w:rsidR="00327443">
<w:rPr>
<w:noProof/>
</w:rPr>
<w:t xml:space="preserve">«#foreach($i in </w:t>
</w:r>
<w:r w:rsidR="00327443">
<w:rPr>
<w:noProof/>
</w:rPr>
<w:lastRenderedPageBreak/>
<w:t>[0..$i»</w:t>
</w:r>
</w:fldSimple>
</w:p>
Do you think this is the problem?
from xdocreport.
Same for the #end tag:
was - valid for processing with xdocreport (freemarker):
<w:r>
<w:fldChar w:fldCharType="begin"/>
</w:r>
<w:r w:rsidRPr="00216279">
<w:rPr>
<w:lang w:val="en-US"/>
</w:rPr>
<w:instrText xml:space="preserve"> MERGEFIELD #end \* MERGEFORMAT </w:instrText>
</w:r>
<w:r>
<w:fldChar w:fldCharType="separate"/>
</w:r>
<w:r w:rsidR="007C2AFD" w:rsidRPr="00216279">
<w:rPr>
<w:rFonts w:cs="Arial"/>
<w:sz w:val="20"/>
<w:lang w:val="en-US"/>
</w:rPr>
<w:t>«#end»</w:t>
</w:r>
<w:r>
<w:fldChar w:fldCharType="end"/>
</w:r>
after saving again (only adding a whitespace) - NOT valid for processing with xdocreport (freemarker):
<w:fldSimple w:instr=" MERGEFIELD #end \* MERGEFORMAT ">
<w:r w:rsidR="007C2AFD" w:rsidRPr="00216279">
<w:rPr>
<w:rFonts w:cs="Arial"/>
<w:sz w:val="20"/>
<w:lang w:val="en-US"/>
</w:rPr>
<w:t>«#end»</w:t>
</w:r>
</w:fldSimple>
from xdocreport.
Sorry this XDocReport github is just a copy of our XDocReport google git project. I don't follow it but now I watch it.
first of all thanks for xdocreport! Very useful and nice library!
Thank's!
Maybe it is possible to synchronize this repository with the one of google code? Otherwise this one here is a little bit out of date, isn't it?
@pascalleclercq could you explain more how to you synchronize it, please.
I think with github it would be much easier to fork your repository and provide pull requests :)
I agree with you, perhaps we should do that, but a lot of people knows our git google.
I would like to find contributors for XDocReport because today it's difficult for me to find time for XDocReport because I'm very busy with my other open source project https://github.com/angelozerr
If you think you could contribute, I think it should be a good idea to move XDocReport to github.
What do you think @pascalleclercq ?
Maybe also a short question, why I am trying to get into your code: Is there any entry point in your code for extracting the freemarker / velocity code out of a docx file?
Yes, this feature is done with preprocessing. We have done a lot of JUnits at https://code.google.com/p/xdocreport/source/browse/#git%2Fintegrationtests%2Ffr.opensagres.xdocreport.core.test%2Fsrc%2Ftest%2Fjava%2Ffr%2Fopensagres%2Fxdocreport%2Fdocument%2Fdocx%2Fpreprocessor
It should be very cool if you could contribute with a new JUnit test which fixes your problem. Thank's!
Regard's Angelo
from xdocreport.
Maybe I could have a look at this issue if I find time and can fork the project on github :)
Here a nice undocumented feature of Git, to push to several git repositories at the same time:
http://dereenigne.org/git/git-multiple-remotes
Using this feature you can support both---GitHub and Google Code---without configuring a dedicated rsync or whatever you like.
from xdocreport.
Hi all,
I confirm I used to push on several git repo with EGit in the past. It's really easy to configure multiple URL with EGit.
Unfortunatly I faced several issues with github and I stopped to sync several months ago.
Maybe It's time to give another try.
The reason why I sync xdocreport on github is to increase the visibility of the project.
from xdocreport.
@may-bee It should be very cool if you can create a JUnit with your case like https://code.google.com/p/xdocreport/source/browse/integrationtests/fr.opensagres.xdocreport.core.test/src/test/java/fr/opensagres/xdocreport/document/docx/preprocessor/Issue401.java
from xdocreport.
Related Issues (20)
- itext7 support HOT 1
- Chinese numbering list can not render correctly
- Image replacement not working on specific environment HOT 2
- Velocity 2.3 say that XDocReport use a lot of configuration key that have been renamed
- Replace dependency com.lowagie:itext:2.1.7 with OpenPDF latest version HOT 2
- Not compatible with OpenPDF 2.0.0 - Runtime error: NoSuchMethodError void fr.opensagres.poi.xwpf.converter.pdf.internal.elements.StylableDocumentSection$SectionPdfPTable.addCell HOT 1
- NullPointerException for getText method of ListItemContext class HOT 3
- Publish version with poi 5.2.5 support HOT 4
- Apache POI document to PDF with table borders creates PDF with texts in cells positioned too low in the cells HOT 9
- illegal reflective access while using default example HOT 1
- Release date of 2.0.5? HOT 3
- there is a error when use fr.opensagres.poi.xwpf.converter.pdf-gae convert word to pdf HOT 2
- Conversion error on docm files
- Join table with freemarker
- text is lost when word is transferred to pdf! HOT 1
- Is repeating bullet points possible HOT 1
- <w:pict> images are not replaced in DOCX template
- OpenPDF converter fails with java.lang.NoSuchFieldError: list HOT 6
- missing elements when converting ODT text file to PDF HOT 1
- Velocity Template Injection
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xdocreport.