문제

I am trying to generate a Office 2010 docx document using XDocReport library. I am printing images in a list with RemoveImageTemplate behavior. The problem is the file opens properly if i provide all the images. And says file is corrupt if any of the image missing. However i can open the properly if using KeepImageTemplate behavior.

Using ODT templates works as expected with RemoveImageTemplate behavior.

I am using XDocReport 1.0.3 with Office 2010. Any help is appreciated.

도움이 되었습니까?

해결책

When you create a "template image" in a docx for XDocReport, you must insert a bookmark inside the image. For instance if your image is inserted in a table cell, your bookmark must be inserted inside the image and not inside the table cell, otherwise the generated docx will not be valid.

It think it's your problem, see at https://code.google.com/p/xdocreport/issues/detail?id=340#c7 for more information.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top