Androidpdfviewer: Question: Is it possible to load pdf from binary data?

Created on 5 Sep 2016  路  6Comments  路  Source: barteksc/AndroidPdfViewer

It would be very nice option, cuz now I should save it to File first.
Thanks.

Most helpful comment

I really need this feature.
For security reasons I don't want to save my byte array in a file.

All 6 comments

Yes, I agree with TS it'll be very useful feature.
I already saw the function "FPDF_LoadMemDocument" in pdfium that can load pdf from bytes and can be used instead of "FPDF_LoadCustomDocument".

I really need this feature.
For security reasons I don't want to save my byte array in a file.

@misaghE you can send pull request. Older versions of PdfiumAndroid used FPDF_LoadMemDocument, but it didn't work good.

@barteksc
Tried to add FPDF_LoadMemDocument.
That solved my issue but I had one problem with open pages cause ptrs were NULL.
Just replaced one page opening to all pages and it works!
For me it was enough because I read only single page pdfs

can anyone show an example how to view a pdf when you have a byte array and can't save it as a file on a disk?

Version 2.3.0 introduced possibility of loading documents from binary data.

Was this page helpful?
0 / 5 - 0 ratings