Pdfium for Android: libpdfium.so size is too large

614 views
Skip to first unread message

Subham Dubey

unread,
Jul 24, 2019, 10:45:21 AM7/24/19
to pdfium
i build the project from source following the steps mentioned below and after building the project the generated with below steps, out directory generated the libpdfium.so file which is 33.1mb

Building Steps followed for android

    > mkdir build
    > cd build
    > mkdir build/source
    > cd source
    > gclient config --unmanaged https://pdfium.googlesource.com/pdfium.git
    > echo "target_os = [ 'android' ]" >> .gclient
    > gclient sync
    > cd pdfium
    > build/install-build-deps-android.sh

Once the dependencies were installed, I executed this :

    > gn args out
    > arguments ->
target_os = "android"
target_cpu = "arm64"  # See "Figuring out target_cpu" below
use_goma = false  # Googlers only. Make sure goma is installed and running first. 
is_debug = false  # Enable debugging features.  
# Set true to enable experimental Skia backend. 
pdf_use_skia = false 
# # Set true to enable experimental Skia backend (paths only). 
pdf_use_skia_paths = false  
pdf_enable_xfa = false  # Set false to remove XFA support (implies JS support). 
pdf_enable_v8 = false  # Set false to remove Javascript support. 
pdf_is_standalone = true  # Set for a non-embedded build.  
is_component_build = false # Disable component build (Though it should work) # 
clang_use_chrome_plugins = false  # Currently must be false.
use_cxx11_on_android=false

   > ninja -C out pdfium

then i got libpdfium.so which was 33mb in out directory along with many other .so files

Lei Zhang

unread,
Jul 25, 2019, 10:26:01 AM7/25/19
to Subham Dubey, pdfium
The build config you specified does not generate .so files. If it did, it should have generated libpdfium.cr.so. So it is possible the libpdfium.so you are referring to is left over from a previous build.

--
You received this message because you are subscribed to the Google Groups "pdfium" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pdfium+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pdfium/066ea702-e833-4173-a7c2-2a4f964f4333%40googlegroups.com.

mailga...@gmail.com

unread,
Mar 6, 2021, 9:46:21 AM3/6/21
to pdfium
Hi, This is happening to my build also in my android project.  libpdfium.cr.so is generating instead of  libpdfium.so. How should I write the build config?
Thank you

K. Moon

unread,
Mar 8, 2021, 2:26:21 PM3/8/21
to mailga...@gmail.com, pdfium
You probably should ask a new question with complete details of how you've tried to build PDFium.

Reply all
Reply to author
Forward
0 new messages