DImuthuUpe / AndroidPdfViewer

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

Large files throw ANR while loading ? why #1098

Open naveedninesol opened 2 years ago

naveedninesol commented 2 years ago

File size larger then 10 mb take lots of time to load and some time throw ANR

vimalcvs commented 2 years ago
android {
    compileSdk 32
    defaultConfig {
        applicationId "com.vimalcvs.xyz"
        minSdk 21
        targetSdk 32
        versionCode 1
        versionName "1.0.0"
        vectorDrawables.useSupportLibrary = true

///------------------------------ try this

        ndk {
            abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86'
            //abiFilters "armeabi", "armeabi-v7a", "x86", "mips", 'arm64-v8a', 'x86_64'
        }
///--------------------------------------

    }
naveedninesol commented 2 years ago

i have PDF file which is almost more than 5000 pages. when i try to load it gives ANR. well i will try this hope it will work

WinWang commented 2 years ago

i have PDF file which is almost more than 5000 pages. when i try to load it gives ANR. well i will try this hope it will work

Try this,change the dependencies to my library(Fix large File OOM) https://blog.csdn.net/wcsandlili/article/details/122420700