This project has moved. For the latest updates, please go here.

Bug in DocX.AddImage...

Aug 13, 2009 at 1:10 PM

Hi, thanks for this great tool :)

However there is a bug that is causing me some problems.

In AddImage(object o) there is a call to IsSameFile(), this function closes the input streams after comparison so the input stream will be closed giving an ObjectDisposedException later (when trying to read from the input stream).

This happens if I add two (or more) images from a stream to the same document (it works for the first picture because the IsSameFile function is not called then).

Also, you should consider using the FileAccess.Read parameter when opening files as streams (for reading) to avoid some potential locked file exceptions.

Hope this is useful, thanks again...

Cheers,
Trond K.
Coordinator
Aug 13, 2009 at 3:27 PM
Hi trnilse,

thank you for taking the time to report this issue. I have just rewritten this function for the next release to incorporate your fix.

thanks again,
Cathal
Aug 13, 2009 at 10:24 PM

 

Cool, that's great! Any plan for when this will be released?

(If it is a little in the future, could you possible upload the source for 1.0.0.6 so I could make a temporrary fix for myself?)

 

Cheers,

Trond K.

Coordinator
Aug 14, 2009 at 9:04 AM
trnilse,

Unfortunately I can't upload the source for 1.0.0.6 because I have mistakenly added to it for 1.0.0.7's release and it is still buggy. If you send me your email address, I will zip up the source for 1.0.0.7 and send it to you?

sorry for the inconvenience,
Cathal
Aug 14, 2009 at 2:56 PM

 

Aha, so that's why there is no 1.0.0.6 source :)  In that case I can wait for 1.0.0.7.

Thanks!

Cheers,

Trond K.