Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to open in-memory files #76

Open
murinrad opened this issue Jan 5, 2021 · 0 comments
Open

Failing to open in-memory files #76

murinrad opened this issue Jan 5, 2021 · 0 comments

Comments

@murinrad
Copy link

murinrad commented Jan 5, 2021

Seems that projects which are using this library cannot open file descriptors which point to an in memory file (named pipes).

After some investigation, it seems that there is a check in the nativeOpenDocument method which verifies the file descriptor by checking the file size. If it it zero, then the method throws an exception.

However a zero file length is valid for in memory files and their file descriptors.
It would be nice if these descriptors were supported.

https://github.com/barteksc/PdfiumAndroid/blob/master/src/main/jni/src/mainJNILib.cpp#L183

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant