Reloading pages on swipe - RadaeePDF.com
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
13 Jul 2017
Microsoft has ended support for Windows Phone 8.1
Read More...
Planned SDK features
  • Page:
  • 1
  • 2

TOPIC: Reloading pages on swipe

Reloading pages on swipe 1 year 2 months ago #12871

  • chandu@ibeesolutions.com
  • chandu@ibeesolutions.com's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 18
  • Thank you received: 0
Hi,
if i open pdf files using http/https urls, every time pages are reloading when i scroll them. The previous loaded page is again loading if i come back to same already loaded screen. Same thing happening in bottom thumbnail.
How to maintain it not to load again and again.??

Thanks
Chandrashekar

Please Log in or Create an account to join the conversation.

Reloading pages on swipe 1 year 2 months ago #12872

  • support
  • support's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 571
  • Karma: 6
  • Thank you received: 46
Preamble: you are using view pager loading single page pdfs via http stream, isn't it?

Accessing the file from http stream brings the application to cache only needed datas.
Using that kind of access isn't producing any permanent store on your device.

Loading/unloading file data is due to:
- memory optimization
- maintain the quicker access allowed by the network

Other customers who are adopting single-paged documents preferred to download each page in background with concurrent download threads and open pdf from storage.
In your case, you was saying you've Pdf of 10/12 pages weighted 10Mbs: I can suppose that each page would be less than 1Mb each.
Downloading the first page and showing it just after download will be completed should be a quick operation.
After downloaded the first page, you might start background download for next pages.

Please Log in or Create an account to join the conversation.

Reloading pages on swipe 1 year 2 months ago #12873

  • chandu@ibeesolutions.com
  • chandu@ibeesolutions.com's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 18
  • Thank you received: 0
No, i'm using single pdf file with multiple pages.
Very first time it is taking time to render, then after swiping between pages is also reloading again and again.
When i dowloaded in local storage then its loading fast. but in my case i have 2 options, online view and offline view. Suppose every day if we download and save in local memory it will be large data after few days. this is not good option for us. User will download on their interest.

Please Log in or Create an account to join the conversation.

Reloading pages on swipe 1 year 2 months ago #12874

  • support
  • support's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 571
  • Karma: 6
  • Thank you received: 46
So, you changed the approach.
Better to know.

http stream, as told, is really like a file system streaming: the tool is maintaining a small cache of needed datas.
The reason is that information and assets in a PDF file might be spread in the file (not contiguous or linear).
For that reason it's not possible to know in advance what the library would need to render a page.
If your files are slow to be rendered first time, it seems aren't optimized for web access: try opening your file in Google Chrome... if optimized you will se pages appearing while download is running, if not optimized you will be able to see the file only when the download is completely done.
If not optimized I suggest you to optimize your files for web.

Even if I've understood your approach, there is now way to give you a simple and running solution:
- http stream are with randomic access, not cached for security and performances reasons.
The access is randomic for 2 reasons: no way to know in advance what the user will like to read, no way to know in advance (from the client) how each page in the PDF file are structured.
- the best and less data consuming way would be to completely download the file on the storage
- otherwise, as done by other customers: split your PDFs in single paged files, download each page one by one and render them in a view pager.

Last approach shall grant your customer to:
- access as quick as possible to each page
- user could interrupt the download process not downloading completely the magazine

Cons:
- you will lose thumbnails as are rendered on the actual PDF and, from page to page in the view pager the "actual PDF file" will contain only a single page... so thumbnail will be with the same single page.

Please Log in or Create an account to join the conversation.

Reloading pages on swipe 1 year 2 months ago #12875

  • chandu@ibeesolutions.com
  • chandu@ibeesolutions.com's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 18
  • Thank you received: 0
I have already used view pager but its crashing with out of memory. i used viewpager with fragment. Could you provide any example of you for viewpager??

Please Log in or Create an account to join the conversation.

Reloading pages on swipe 1 year 2 months ago #12876

  • support
  • support's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 571
  • Karma: 6
  • Thank you received: 46
After your requests about view pager, during last few days, we did some work on it and found an issue in view pager code which is bringing to a memory leak and consequent crash.
Dev team released an internal version two days ago and, after some more tests we will release it today.

It seems you've not yet defined the better way to design your UI and UX.
To avoid you wasting more time I suggest you to open a ticket (on the trouble ticket platform) and address it to sales / pre-sales requests: normally we don't offer such a kind of support but after an internal discussion we agreed to better listening to you.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
  • 2
Powered by Kunena Forum