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

Thu Apr 20, 2017 11:49 am

As I'm showing lots of different PDF's in multiple tabs there is a problem if the user starts scrolling or waits for a while – the different PDF’s content get mixed as there is a session state cache with only one PDF, the last loaded..or the first – whatever.
I have tried to disable caching / paging in code by doing this:

this.PdfDocumentViewer1.CacheInterval = 0; // 1200;
this.PdfDocumentViewer1.CacheTime = 0; // 1000;
this.PdfDocumentViewer1.CacheNumberImage = 0; // 1000;
this.PdfDocumentViewer1.CacheNumberStream = 0;
this.PdfDocumentViewer1.CacheStreamInterval = 1;
this.PdfDocumentViewer1.CacheStreamTime = 1;
this.PdfDocumentViewer1.ScrollInterval = 300;
I can by the way not find any documentation for the property ”ScrollInterval”.

Now even through this seems to work there is a new problem – after about a minute the pages opens an alert box informing “Page request fails, it may have been released stream”

How can I show the full PDF document and avoid paging. It would be fine to show the document without any scrollbars at all.

Kbjoern
 
Posts: 2
Joined: Wed Feb 22, 2017 1:05 pm

Fri Apr 21, 2017 8:29 am

Dear Kbjoern,

Thanks for your inquiry.
Sorry that Spire.PDFViewer doesn't support showing the full PDF document without paging at present. But we will investigate if it can be done as a new feature. Once there is any progress, we will inform you.
In addition, could you please provide us with sample project showing us the issue "if the user starts scrolling or waits for a while - the different PDF's content get mixed" ? We will check if there is a good way to solve it, hence it is no need to do that new feature.

Thanks,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Fri Apr 21, 2017 11:36 am

It's not possible to give you some sort of sample - it's very simple though !

I have basically taken your code sample for asp.net, and then from the RUN box in windows I call my website with a url telling the webpage what PDF to load in the querystring – I then call it 2-4 times with different PDF’s and afterwards I scroll in one of the tabs that was opened up by windows in IE and look and behold, the PDF content get mixed.

The other test is where I try to disable stream caching changing the cache etc. values as the code I provided in my first forum request, after I load 2 documents that works ok with scrolling an IE alertbox atones telling me “Page request fails, it may have been released stream”


Yours Sincerely
K

Kbjoern
 
Posts: 2
Joined: Wed Feb 22, 2017 1:05 pm

Mon Apr 24, 2017 9:05 am

Dear K,

Many thanks for your information.
Sorry that I still cannot reproduce your issue, and here is my sample project which can load other file successfully for checking.
http://www.e-iceblue.com/downloads/atta ... werAsp.zip
Please run the project and then change the URL to load other file, as below.
Code: Select all
http://localhost:4717/Index.aspx?CacheInterval=1000&CacheTime=1200&CacheNumberImage=1000&ScrollInterval=300&file=2.pdf

And then tell us the result.

Thanks,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Return to Spire.PDFViewer

cron