Loading Documents from Files on the Server

A common usage scenario for the C1PdfViewer control is to have a report server (such as C1Report or Microsoft SQL Server Reporting Services) generate reports on a schedule, and deploy them to the file system on the server. Your Silverlight or WPF applications can then get these files from the server and display them to the user with very little overhead.

This scenario is illustrated in the C1PdfViewerQuickstart sample.

After adding the C1PdfViewer to your application, you should add a Silverlight-enabled WCF service to the server project. This service will provide the Silverlight client with the list of reports available and with the actual document streams for each report.

For example, the following is a typical implementation of a report provider Web service:

      Visual Basic

      C#

As you can see, the code is very standard. The first method lists the reports available on the server so the Silverlight application can show a list of reports to the user, and the second method returns the byte stream that represents the selected report.

The client part of the application uses the service as follows:

      Visual Basic

      C#


Send us comments about this topic.
Copyright © GrapeCity, inc. All rights reserved.