Visitar URL original
PdfiumAndroid with Supporting Android API >=21 · Issue #93 · barteksc/PdfiumAndroid · GitHub
Skip to content

PdfiumAndroid with Supporting Android API >=21 #93

Description

@lion1988dev

Updated version of PdfiumAndroid , with the latest pdfium so libraries and supporting Android API >= 21. Also updated new version of AndroidPdfViewer

Activity

  1. marain87 commented on May 6, 2024

    @marain87

    Thank you @lion1988dev,

    However, I’ve encountered an issue with the new version of the library: it doesn’t display annotations and signatures on PDF files. To address this, I made some modifications to the code in PdfiumAndroid and submitted a pull request to your branch.

    It is related to FPDF_FFLDraw not called for new version of Pdfium render annotation and signature.
    code ref to sample of pdfium

    Demo of my AndroidPdfViewer

  2. marain87 commented on Jun 3, 2025

    @marain87

    PdfiumAndroid also updated to support 16KB for android 15 / 16, #95

  3. madmas commented on Sep 5, 2025

    @madmas

    @marain87 @lion1988dev @ynkfish: I tried your releases of PdfiumAndroid to include them in https://github.com/NativeScript/plugins/tree/main/packages/pdf to get it 16kb compliant.

    I used the commands documented in https://developer.android.com/guide/practices/page-sizes , but validations fails: hackergarten/contributions#9 (comment) (some notes I took for myself)

    Could you validate it on another path? Could you successfully publish an app to google with it?

  4. AhmerAfzal1 commented on Sep 5, 2025

    @AhmerAfzal1

    Try AhmerPdfium with pdfviewer

    Image

  5. madmas commented on Sep 5, 2025

    @madmas

    @AhmerAfzal1 thanks a lot for the response and the hint! Very much appreciated

    Yes, I tried now to use you lib and would love to migrate @nativescript/pdf to it.

    While Android Studio looks fine, the command line check described by Google fail, as I described in hackergarten/contributions#9 (comment)

    Have you yet published a app with it and went is without warning at Google?

  6. AhmerAfzal1 commented on Sep 5, 2025

    @AhmerAfzal1

    @madmas I used the check_elf_alignment.sh from https://developer.android.com/guide/practices/page-sizes#elf-alignment script to verify ELF segment alignment for shared libraries, and you can see in screenshot of the script output below for reference.

    Image

    According to the official documentation, if any arm64-v8a or x86_64 shared libraries are unaligned, then further steps are not required.

    Image

    As shown in the screenshot, both arm64-v8a and x86_64 libraries are properly aligned and also support 16 KB page sizes, which matches Google Play’s compatibility requirements.

    From my understanding, we cannot forcibly make ABIs other than arm64-v8a and x86_64 aligned and 16 KB page size supported. Since Android Studio builds arm64-v8a and x86_64 with 16 KB alignment, the other ABIs are also effectively aligned to 16 KB.

  7. marain87 commented on Sep 6, 2025

    @marain87

    @madmas ref to another post which base is PdfiumAndroid : DImuthuUpe/AndroidPdfViewer#1191
    and only arm64-v8a/x86_64 libs need to be aligned for 16KB.

  8. madmas commented on Sep 10, 2025

    @madmas

    @AhmerAfzal1 @marain87 thanks a lot for your replies and explanations. I tried to adopt AhmerPdfium but could not use it as a drop-in replacement and migrating to it being an Kotlin library was not straight forward.
    Then, given you input about the checks, I decided to give it a try with the version from @marain87 and if worked out with the checks from google 👍 - NativeScript/plugins#645

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions