VersatileSoftware
USA
3 Posts |
Posted - Apr 11 2018 : 16:49:21
|
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 |
|