Repository navigation
PdfiumAndroid with Supporting Android API >=21 #93
Description
Activity
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 pdfiumDemo of my AndroidPdfViewer
PdfiumAndroid also updated to support 16KB for android 15 / 16, #95
@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?
Try AhmerPdfium with pdfviewer
@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?
@madmas I used the
check_elf_alignment.shfrom 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.
According to the official documentation, if any arm64-v8a or x86_64 shared libraries are unaligned, then further steps are not required.
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.
@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.@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#645Reacted by Ahmer Afzal

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