Feb 11, 2011 at 8:22 AM
Edited Feb 11, 2011 at 10:05 AM
I'm currently evaluating the document tookit with a view to purchasing. My requirement is to stream xps documents from a webservice to be displayed in Silverlight.
So far I have successfully been able to display xps documents in your viewer Document Viewer when the xps file is included in the project as a resource file
DataSource.PackageReader = new SharpZipPackageReader(new uri("some uri", UriKind.Relative))
However whenever I try to pass a stream from the webservice to the packageReader I get an error. Example Code:
Dim s as Stream = new MemoryStream
s.Write(e.Result, 0, e.Result.Length) // Stream returned from webservice
Datasource.PackageReader = new SharpZipPackageReader(s)
The error details are as follows
'Could not read the xps package. Either the package is not valid or the used package reader does not support the ZIP format of the package....."
The xps document I am streaming from the webservice is the same document that I had previously tested as a resource. Would appreciate any help you can offer as your product looks to be a good solution for us however we would have to be able to load documents
from a stream.