This example shows how to load a document from the Stream using the DocumentViewerControl.DocumentSource property. The stream is obtained from the assembly resources:
[C#]Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName);
Note the input stream will not be closed until the control uses the loaded document (PdfViewerControl.DetachStreamOnLoadComplete is set to false by default). This allows the PDF Viewer to render a large PDF file quickly.
See also:
Loading a Document