PdfiumAndroid icon indicating copy to clipboard operation
PdfiumAndroid copied to clipboard

Failing to open in-memory files

Open murinrad opened this issue 5 years ago • 0 comments

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

murinrad avatar Jan 05 '21 19:01 murinrad