DImuthuUpe / AndroidPdfViewer

Android view for displaying PDFs rendered with PdfiumAndroid
Apache License 2.0
8.17k stars 1.91k forks source link

Large PDF files take a long time #1209

Open abo3bdoo opened 2 months ago

abo3bdoo commented 2 months ago

When the pdf file size is large, exceeding 100 MB, it takes time to display, so I suggest:

  1. Lazy Loading It usually loads pages gradually with scrolling, and it can be made to display pages within a certain number range, for example 10 before the current page and 10 after it, so that the user does not wait at all Or:
  2. When the file is opened, the page that was entered appears directly with 10 before and 10 after it, and then the rest of the pages are loaded in the background in the usual way. Or:
  3. If the file is large, it is divided into 5 sections, each of which has 50 pages, for example, and when the first section is loaded, if the second section is approached, it is loaded with the same display. Example: From the list of titles, we opened a page belonging to file_1.pdf, and let's assume that we reached page 48, file_2.pdf is added to the display, so that we have 100 pages displayed, in other words, file_1.pdf and file_2.pdf become one block