Hi,
Hope you all are well!
With this simple code:
Code:
public XImage GetXImage(string remotepath)
{
MemoryStream ms = new MemoryStream();
if (connect())
{
if (CallRemoteExists(remotepath, EntryType.File))
{
objDart.Get(remotepath, 0, ms);
return XImage.FromStream(ms);
}
else
return null;
}
else
return null;
}
I'm getting the exception : "The parameter is not valid" in XImage.FromStream method.
The library objDart gets a pdf file from a remote server via FTP and writes it onto a stream. Works fine, but when i try to use the XImage.FromStream it throwns the above exception. I've used this library to get stream files from remote server, and always has worked flawlessly with the stream that you get. But seams that PdfSharp.Drawing.XImage.FromStream() doesn´t support the stream i'm getting from that library.
Am i missing something from that method?
What i'm doing wrong?
Thank you so much!
regards