Spire.PDFViewer is a powerful PDF Viewer component for .NET. It allows developers to load PDF document from stream, file and byte array.

Thu Jan 04, 2018 5:02 am

I've recently heard about iceblue pdfviewer and use demo of this solution to purchase for my project.(winform)

is it possible that my server has pdf file and client(pc) could read only thumbnail without download pdf file?

then how can i approach to solution? if it won't be able to, how i should do it for this?

thank you.

kelesym
 
Posts: 12
Joined: Thu Jan 04, 2018 1:42 am

Thu Jan 04, 2018 8:46 am

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
User avatar

Jane.Bai
 
Posts: 1156
Joined: Tue Nov 29, 2016 1:47 am

Return to Spire.PDFViewer