xceedsoftware / DocX

Fast and easy to use .NET library that creates or modifies Microsoft Word files without installing Word.
Other
1.77k stars 472 forks source link

Questions about InsertDocument #425

Open cyyen opened 2 years ago

cyyen commented 2 years ago

Hi, I have two questions about InsertDocument

  1. I can't open the merge docx if the docx has charts.
  2. The picture in the merge docx will be cut.
XceedBoucherS commented 2 years ago

Hello, you are right, I've just tested the insertion of a document into another where 1 of them contains a chart and the output docx can't be opened with MS Word. We will look into this. Thank you for reporting this.

XceedBoucherS commented 2 years ago

Ok, this issue should be fixed in v2.3. Thank you

c2056love commented 1 year ago

Hi, about this question,does this Issue fixed? I try in ver 2.4,but doesnt work. hope for your reply. thanks

XceedBoucherS commented 1 year ago

Hello @c2056love , Could you attached a simple document to this thread so we could test ? Also could you pase the code you are using to insert the document ? Thank you

c2056love commented 1 year ago

@XceedBoucherS https://github.com/c2056love/Test This demo project was code by c#,hope you can run it I want to merge 1.docx and 2.docx into a new file(result.docx).

XceedBoucherS commented 1 year ago

@c2056love, When I open your link, it shows me the xceedsoftware/docx issues tab with no result matching the search. I can't see the sample.

c2056love commented 1 year ago

@XceedBoucherS Sorry About that. trying this url https://github.com/c2056love/Test Or you can paste url into new tab.

XceedBoucherS commented 1 year ago

Thank you for the sample, I was able to test it. My first impression is that Chart object do not merge smoothly with another document. I'll try to have a deeper look. Thank you for reporting this.

XceedBoucherS commented 1 year ago

One of the problem comes from the fact that the chart contains a relation to an externalData (embeddings/Microsoft_Excel_Worksheet.xlsx). Without this external Data it should work.

This fix should be included in v2.6. Thank you.