This project has moved and is read-only. For the latest updates, please go here.

Throws NotSupportedException on AddImage (stream)

Mar 31, 2014 at 9:55 PM
Edited Mar 31, 2014 at 9:57 PM
Hello guys,

I'm using this amasing library for my project.

Replace Text worked just awesome, but right now I'm trying to put an image to a document saved on a MemoryStream.

My image is in BYTE format on the SQL Server.

It's giving me this error:
Path.GetFullPath(imagePartUri.Replace("\\_rels", string.Empty)) 'Path.GetFullPath(imagePartUri.Replace("\\_rels", string.Empty))' threw an exception of type 'System.NotSupportedException' string {System.NotSupportedException}
( Line: 3016 )
The content of imagePartUri.Replace("\\_rels", string.Empty) is \\word\\cid:image001.png@01CDF7F8.586470E0
Any ideas why this is happening?
Apr 1, 2014 at 9:42 AM
I commented the lines 2997=>3046 in DocX.cs since I don't need to get the images from the existing document, and it worked OK!

But if I could get it to work as it is, it would be great.