Giter VIP home page Giter VIP logo

pdfiumandroid's Introduction

#Pdfium Android( >= API Level 9 ) binding Use pdfium library from AOSP
The demo app is here

TODO:


* Push to Maven Central

pdfiumandroid's People

Contributors

mshockwave avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pdfiumandroid's Issues

the so file 'libc++_shared.so' is located in the libs folder, while doesn't exist when running project

09-13 16:08:00.816 19943-19943/com.shockwave.pdfiumtest E/com.shockwave.pdfium.PdfiumCore: Native libraries failed to load - java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.shockwave.pdfiumtest-2/base.apk"],nativeLibraryDirectories=[/data/app/com.shockwave.pdfiumtest-2/lib/arm64, /system/lib64, /vendor/lib64]]] couldn't find "libc++_shared.so"
09-13 16:08:00.816 19943-19943/com.shockwave.pdfiumtest D/com.shockwave.pdfium.PdfiumCore: Starting PdfiumAndroid 1.9.0
09-13 16:08:00.821 19943-19943/com.shockwave.pdfiumtest E/art: No implementation found for long com.shockwave.pdfium.PdfiumCore.nativeOpenDocument(int, java.lang.String) (tried Java_com_shockwave_pdfium_PdfiumCore_nativeOpenDocument and Java_com_shockwave_pdfium_PdfiumCore_nativeOpenDocument__ILjava_lang_String_2)
09-13 16:08:00.822 19943-19943/com.shockwave.pdfiumtest D/AndroidRuntime: Shutting down VM
09-13 16:08:00.824 19943-19943/com.shockwave.pdfiumtest E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.shockwave.pdfiumtest, PID: 19943
java.lang.UnsatisfiedLinkError: No implementation found for long com.shockwave.pdfium.PdfiumCore.nativeOpenDocument(int, java.lang.String) (tried Java_com_shockwave_pdfium_PdfiumCore_nativeOpenDocument and Java_com_shockwave_pdfium_PdfiumCore_nativeOpenDocument__ILjava_lang_String_2)
at com.shockwave.pdfium.PdfiumCore.nativeOpenDocument(Native Method)
at com.shockwave.pdfium.PdfiumCore.newDocument(PdfiumCore.java:135)
at com.shockwave.pdfium.PdfiumCore.newDocument(PdfiumCore.java:127)
at com.shockwave.pdfiumtest.PdfActivity.onCreate(PdfActivity.java:128)
at android.app.Activity.performCreate(Activity.java:6875)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2711)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2819)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1558)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:163)
at android.app.ActivityThread.main(ActivityThread.java:6396)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)

Is it possible to get input stream of a password protected PDF?

My requirement is to get a InputStream of a password protected PDF and print the PDF using the InputStream .

I can pass password protected PDF filepath and password.
In return decrypted pdf file's InputStream is required.

Can someone please confirm if there is any such method supported by this library

Shutting down after loading about 80 pages without Exception

Activity which use this library finishing without Exceptions after paging heavy pdf-document (magazine) for many times (about 80 pages).

Here is Log:

11-03 13:15:09.302 909-1240/system_process E/InputDispatcher﹕ channel '2c1798f6 com.shockwave.pdfiumtest/com.shockwave.pdfiumtest.PdfActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
11-03 13:15:10.094 15037-15154/com.google.android.gms.persistent E/MDM﹕ [336905] b.run: Couldn't connect to Google API client: ConnectionResult{statusCode=API_UNAVAILABLE, resolution=null, message=null}
11-03 13:15:10.097 15037-15037/com.google.android.gms.persistent E/GmsWearableLS﹕ GoogleApiClient connection failed: ConnectionResult{statusCode=API_UNAVAILABLE, resolution=null, message=null}
11-03 13:15:10.421 15037-15037/com.google.android.gms.persistent E/ctxmgr﹕ [PowerConnectionState]Could not write powerInfo=Plug state: 2 BatteryLevel: 0.88, status=Status{statusCode=unknown status code: 7503, resolution=null}
11-03 13:15:10.489 15037-15397/com.google.android.gms.persistent E/MDM﹕ [336937] b.run: Couldn't connect to Google API client: ConnectionResult{statusCode=API_UNAVAILABLE, resolution=null, message=null}
11-03 13:15:10.563 15037-15403/com.google.android.gms.persistent E/MDM﹕ [336938] b.run: Couldn't connect to Google API client: ConnectionResult{statusCode=API_UNAVAILABLE, resolution=null, message=null}
11-03 13:15:10.647 909-1250/system_process E/WifiStateMachine﹕ WifiStateMachine CMD_START_SCAN source -2 txSuccessRate=6,93 rxSuccessRate=28,47 targetRoamBSSID=00:00:00:00:00:00 RSSI=-62
11-03 13:15:10.650 909-1250/system_process E/WifiStateMachine﹕ WifiStateMachine starting scan for "airport 5GHz"WPA_PSK with 5240,2412
11-03 13:15:11.013 15037-15459/com.google.android.gms.persistent E/MDM﹕ [336939] b.run: Couldn't connect to Google API client: ConnectionResult{statusCode=API_UNAVAILABLE, resolution=null, message=null}
11-03 13:15:11.114 15071-15083/com.google.process.gapps E/DataBuffer﹕ Internal data leak within a DataBuffer object detected! Be sure to explicitly call release() on all DataBuffer extending objects when you are done with them. (internal object: com.google.android.gms.common.data.DataHolder@15ab4d6d)
11-03 13:15:11.116 15071-15083/com.google.process.gapps E/DataBuffer﹕ Internal data leak within a DataBuffer object detected! Be sure to explicitly call release() on all DataBuffer extending objects when you are done with them. (internal object: com.google.android.gms.common.data.DataHolder@3ad55da2)
11-03 13:15:11.117 15071-15083/com.google.process.gapps E/DataBuffer﹕ Internal data leak within a DataBuffer object detected! Be sure to explicitly call release() on all DataBuffer extending objects when you are done with them. (internal object: com.google.android.gms.common.data.DataHolder@1cac6a33)
11-03 13:15:11.118 15071-15083/com.google.process.gapps E/DataBuffer﹕ Internal data leak within a DataBuffer object detected! Be sure to explicitly call release() on all DataBuffer extending objects when you are done with them. (internal object: com.google.android.gms.common.data.DataHolder@1436f1f0)
11-03 13:15:11.119 15071-15083/com.google.process.gapps E/DataBuffer﹕ Internal data leak within a DataBuffer object detected! Be sure to explicitly call release() on all DataBuffer extending objects when you are done with them. (internal object: com.google.android.gms.common.data.DataHolder@28bc5369)
11-03 13:15:11.120 15071-15083/com.google.process.gapps E/DataBuffer﹕ Internal data leak within a DataBuffer object detected! Be sure to explicitly call release() on all DataBuffer extending objects when you are done with them. (internal object: com.google.android.gms.common.data.DataHolder@25cfb1ee)

Partial rendering

We need a way to render part of a page when zooming in. Like tile rendering in a mapview
How do we solve this issue?

Require support for generate jni library

I've encountered the following error when trying to build the jni library in the jni folder

make: *** No rule to make target out/vivapro_evt0R_qisda/target/product/msm8974/obj/SHARED_LIBRARIES/aospPdfium_intermediates/export_includes', needed byout/vivapro_evt0R_qisda/target/product/msm8974/obj/SHARED_LIBRARIES/jniPdfium_intermediates/import_includes'. Stop.

In addition, I' m kind of new for shared library.
May I ask what is the file "libandroid-ndk-profiler.a" for?
I googled it , Is it just for analysis ?

Method for rebuilding the bundled pdfium shared objects?

It would be awesome if the project had documentation for building the shared objects again from source, and where the source code that produced them lives, and also what specific version built them in order to reproduce them deterministically. Right now all we have is ELF blobs checked into git.

Was it the upstream android pdfium tree (https://android.googlesource.com/platform/external/pdfium/) that built them? If so, is it possible to document how it was done (scripting it would be even better) so it can be readily reproduced for new versions of pdfium?

Thank you!

Throwing PdfOpenException while populating a pdf file in phone storage

Am getting an exception while reading a pdf which is in phone internal memory. I have given the permission to read in the manifest file.
But am getting an exception at the place given below:

com.shockwave.pdfium.PdfOpenException: Open document failed
at com.shockwave.pdfium.PdfiumCore.newDocument(PdfiumCore.java:72)
at com.github.barteksc.pdfviewer.DecodingAsyncTask.doInBackground(DecodingAsyncTask.java:64)
at com.github.barteksc.pdfviewer.DecodingAsyncTask.doInBackground(DecodingAsyncTask.java:33)
at android.os.AsyncTask$2.call(AsyncTask.java:288)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)

The exception is in the line pdfDocument = pdfiumCore.newDocument(getSeekableFileDescriptor(path));

Could you please help me to overcome this.
Thanks

Text search and selection

Hi,
I just want to ask if you plan to add text search and selection features soon? That would be really nice!
Thanks a lot!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.