Prabhadon / xdocreport

Automatically exported from code.google.com/p/xdocreport
0 stars 0 forks source link

Unable to use NullImageBehaviour.RemoveImageTemplate #340

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Unable to use NullImageBehaviour.RemoveImageTemplate property.
2.
3.

What is the expected output? What do you see instead?
The docx should open without the missing image. Seems like generated output is 
corrupted and is upable to open.

What version of the product are you using? On what operating system?
1.0.3 with Win 7 x64. MS Office 2010

Please provide any additional information below.
Report is generated properly with NullImageBehaviour.KeepImageTemplate

Original issue reported on code.google.com by Saha.Sud...@gmail.com on 7 Dec 2013 at 6:26

Attachments:

GoogleCodeExporter commented 9 years ago
Please provide a basic sample with java main+docx which causes your probblem.

Original comment by angelo.z...@gmail.com on 7 Dec 2013 at 10:45

GoogleCodeExporter commented 9 years ago
The files are exactly the same as attached in issue#339. Only below changes are 
made to XDocReportPOC.java.

metadata.addFieldAsImage("photo", 
"ques.pic",NullImageBehaviour.RemoveImageTemplate);

List<Questions> ques = Arrays.asList(
            new Questions("1","ques1","2",System.getProperty("user.dir").toString()+"/src/Algebra.jpg"), 
            new Questions("2","ques2","4",System.getProperty("user.dir").toString()+"/src/Algebra1.jpg"),
            new Questions("3","ques3","6",null));

Let me know if you still need the entire files.

Original comment by Saha.Sud...@gmail.com on 7 Dec 2013 at 3:57

GoogleCodeExporter commented 9 years ago
I cannot do nothing with your code (I have Algebra.jpg, I would like to avoid 
setting this picture to my user.dir, etc). I have no time to do that. On other 
words, I would like to have an eclipse project for instance which works without 
doing some configuration.

Original comment by angelo.z...@gmail.com on 7 Dec 2013 at 11:58

GoogleCodeExporter commented 9 years ago
I use NetBeans and am attaching the NB Project zip. This will have all the 
necessary files and images.

Original comment by Saha.Sud...@gmail.com on 9 Dec 2013 at 1:49

Attachments:

GoogleCodeExporter commented 9 years ago
Ok Thank's, I will see that when I will find time.

Original comment by angelo.z...@gmail.com on 9 Dec 2013 at 1:52

GoogleCodeExporter commented 9 years ago
Update: I tested the exact code with ODT files and it worked as expected. Now I 
dont know if this library is incompatible/ with/ broken for MS Office 2010.

I will try testing it in Office 2007.

Original comment by Saha.Sud...@gmail.com on 17 Dec 2013 at 12:49

GoogleCodeExporter commented 9 years ago
Hi,

I have seen your Temp1.docx which causes your problem. It doesn't work because 
your bookmark is not inserted correctly : your bookmark must be inserted inside 
the template image and not in the table cell (like your case).

I have attached your docx Temp1.docx where bookmark is inserted inside the 
template image and it works well.

Regards Angelo

Original comment by angelo.z...@gmail.com on 18 Dec 2013 at 7:56

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Thanks a lot Angelo. That was very helpful.

Original comment by Saha.Sud...@gmail.com on 18 Dec 2013 at 3:54

GoogleCodeExporter commented 9 years ago
Ok I fix this issue.

Original comment by angelo.z...@gmail.com on 18 Dec 2013 at 4:01