pvginkel / PdfiumViewer

PDF viewer based on Google's PDFium.
Apache License 2.0
966 stars 418 forks source link

Performance Issue Opening Very Large PDFs #184

Open legistek opened 5 years ago

legistek commented 5 years ago

Opening very large (1000s of pages) PDFs seems very slow. I traced it to PdfFile.GetPDFDocInfo which is retrieving the page info for every page before returning. I wonder if a better solution might be to lazily retrieve (and then store for future use) the page info for each page as needed. It should just be a matter of a custom IList<T> implementation for the PdfDocument.PageSizes property. Thoughts?