Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Tuesday, September 19, 2023 8:11:40 AM(UTC)
Satish Trivedi

Groups: Registered
Posts: 5


Stream PDF in document viewer (https://www.leadtools.com/help/sdk/dh/javascript/doxui/documentviewerthumbnails-lazyload.html) – Here lazy load does not work for steam. It download whole pdf and then it show to the user. However, is it possible to load only required pages and or specific pages first. Even if we mentioned specific page to show, it download whole pdf/tiff file first.

If file is around 500 MB, first it should download few pages/10 MB and start showing to the users. Here whole file (500 MB) download and then it show to the users.

Please suggest. Code for lazy load which does not fulfill our purpose.
docViewer.view.lazyLoad = true;
if (docViewer.thumbnails)
docViewer.thumbnails.lazyLoad = true;
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Tuesday, September 19, 2023 1:42:28 PM(UTC)

Nick  
Nick

Groups: Registered, Tech Support, Administrators
Posts: 163

Was thanked: 9 time(s) in 9 post(s)

You can perform this and control which pages are loaded and presented in the viewer in your application by using a LEADDocument. With a LEADDocument, you can load an initial range, then finish while these are presented to the user. See this forum post for additional information and documentation links.
https://www.leadtools.co...-HTML-5-viewer#post45205
Nick Crook
Developer Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 
#3 Posted : Wednesday, December 6, 2023 1:26:08 AM(UTC)
noramila

Groups: Registered
Posts: 12

Thanks: 4 times

Try this.

// Disable lazy loading for the document viewer
docViewer.view.lazyLoad = false;

// Check if thumbnails are available and disable lazy loading for them as well
if (docViewer.thumbnails)
docViewer.thumbnails.lazyLoad = false;

Set lazyLoad to false for both the document viewer and thumbnails, you disable the default lazy loading behavior. You can then implement your custom lazy loading logic based on your requirements.
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.082 seconds.