Hello,
Thanks for your inquiry.
Our Spire.PdfViewer support loading files from stream, please download the latest hotfix(
Spire.PDFViewer Pack(Hotfix) Version:2.12.57) and refer to the code below.
- Code: Select all
byte[] bytes = File.ReadAllBytes(inputfile);
Stream stream = new MemoryStream(bytes);
this.pdfDocumentViewer1.LoadFromStream(stream);
if (this.pdfDocumentViewer1.IsDocumentLoaded)
{
int percent = 0;
bool isNumeric = int.TryParse(this.txtThumbnailRatio.Text, out percent);
if (isNumeric)
{
this.pdfDocumentThumbnail1.ZoomPercent = Math.Abs(percent);
}
}
If there's still any doubt, please get it back to us.
Sincerely,
Jane
E-iceblue support team