ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Loading large pdf files into ImageEnMView is slow!
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

VersatileSoftware

USA
3 Posts

Posted - Apr 11 2018 :  16:49:21  Show Profile  Reply
It takes a very long time to load a large pdf file using ImageEnMView.MIO.LoadFromFile('somefile.pdf'). The delay is most noticeable when the pdf has around 10 or more pages. The delay gets worse for each page over 10. If the pages get to be 75-100 or more, this delay will normally last for minutes.

In my application, I'm loading a pdf file into an ImageEnMView and displaying the currently selected page by the user with an ImageEnView. This process works fine until the file to be previewed is large. The user gets an extreme delay initially when the file is loaded into the ImageEnMView.

How can I speed up this process? Is there a way to load the first page or selected pages from within the pdf without having to load the whole pdf into the ImageEnMView and then find the pages? Or is there a function or procedure that will only load the page positions in the pdf and display them on demand?

I was playing with streams thinking that the file could be loaded in and pull only the pages needed. But I wasn't able to determine how to get the number of pages and page breaks in the stream.

BTW, I'm using the WPCubed plugin.

Thanks,
Ron

xequte

38175 Posts

Posted - Apr 11 2018 :  18:49:30  Show Profile  Reply
Hi Ron

Before I bring Julian@WPCubed into this, can I ask if you have tried using LoadFromFileOnDemand?

https://www.imageen.com/help/TImageEnMView.LoadFromFileOnDemand.html

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

jrpcguru

USA
254 Posts

Posted - Apr 27 2018 :  15:04:59  Show Profile  Reply
For what it is worth, I've just used the new ImageEnView.IO.LoadFromFilePDF to load individual pages from a 180 page PDF file. Each is then moved to ImageEnMView and each page seemed to take as much time as any other.

I also tried the new ImageEnMView.MIO.LoadFromFilePDF and it was very fast. almost as if it was automatically doing the LoadFromFileOnDemand.

In both cases I am setting the DPI to 200 ahead of time. I learned the hard way when I first started using the WPCubed plugin that not setting the DPI produced very slow load times and huge megapixels per page.

J.R.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: