This question is locked. New answers and comments are not allowed.
Hello,
I'm trying to create an application where there is a WCS service that sends a Byte Array to a Silverlight Client. The Byte Array is created directly reading a PDF document through a Binary Reader. The PDF document is dinamically created server side.
In the Silverlight Client I use a MemoryStream to read the byte array that represents the PDF file.
Finally I pass the MemoryStream to the PDFDocumentSource that I use as DocumentSource Property in the PDF Viewer.
The problem is that I see "Loading..", then "Loading..." disappears and the document is not shown in the window.
Here's my VB code
.....retrieving data from WCF.....
....Then I close the stream in the MyPdfDocumentSourceLoaded routine.....
I've also tried to read the PDF source file opening it in your online demo and everything works properly.
Do you have any ideas? Is it an encoding problem? Do you think I have to save the file in the Isolated Storage before open it in the Pdf Viewer Control?
Best regards.
David
I'm trying to create an application where there is a WCS service that sends a Byte Array to a Silverlight Client. The Byte Array is created directly reading a PDF document through a Binary Reader. The PDF document is dinamically created server side.
In the Silverlight Client I use a MemoryStream to read the byte array that represents the PDF file.
Finally I pass the MemoryStream to the PDFDocumentSource that I use as DocumentSource Property in the PDF Viewer.
The problem is that I see "Loading..", then "Loading..." disappears and the document is not shown in the window.
Here's my VB code
Dim
MyOutputStream as IO.MemoryStream
Dim
MyFileContent
As
List(Of
Byte
)
MyOutputStream =
New
MemoryStream(MyFileContent.ToArray)
Dim
MyPDFDocumentSource
As
New
PdfDocumentSource(MyOutputStream)
AddHandler
MyPDFDocumentSource.Loaded,
AddressOf
MyPdfDocumentSourceLoaded
RadPdfViewer1.DocumentSource = MyPdfDocumentSource
I've also tried to read the PDF source file opening it in your online demo and everything works properly.
Do you have any ideas? Is it an encoding problem? Do you think I have to save the file in the Isolated Storage before open it in the Pdf Viewer Control?
Best regards.
David