View the PDF Stream in PDF Viewer

21 Sep 20201 minute to read

PDF files as stream can be viewed in Essential PdfViewerControl using the overload available in the Load method. Following are the code snippets.

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

//Initialize PDF Viewer

PdfViewerControl pdfViewerControl1 = new PdfViewerControl();

//Load the PDF

Dim stream As New FileStream("Sample.pdf", FileMode.Open)

'Initialize PDF Viewer

Dim pdfViewerControl1 As New PdfViewerControl()

'Load the PDF