View the PDF stream in viewer

PDF files as stream can be viewed in Essential PDF Viewer using the overload available in the Load method. Use the following code example to load the PDF streams in viewer:

FileStream stream = new FileStream("Template.pdf", FileMode.Open);

//Initialize PDF Viewer

PdfViewerControl pdfViewer1 = new PdfViewerControl();



//Load the PDF

pdfViewer1.Load(stream);
Dim stream As New FileStream("Template.pdf", FileMode.Open)



'Initialize PDF Viewer

Dim pdfViewer1 As New PdfViewerControl()



'Load the PDF

pdfViewer1.Load(stream)