Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Save pdf inside html5 local storage

I am using mozilla pdf.js to read and display content of a pdf file on browser. Later i thought to take this functionality offline and make use of local storage.

Till now i am able to create an offline app which makes use of manifest to make my app offline but the real challenge i have is how to read the pdf which is lying on my server.

Is there any way to save that pdf inside the local storage or any other way to save pdf data as blob inside local storage and then make on fly pdf using blob data.

Kindle cloud reader has this functionality but i am not sure how they are doing it.

Also i am not looking for code ( if any one can show the code that will be great ). Just guide me to the right direction because i know it is possible.

like image 722
Aman Virk Avatar asked Nov 17 '25 14:11

Aman Virk


1 Answers

You can use indexed DB. http://hacks.mozilla.org/2012/02/storing-images-and-files-in-indexeddb/

http://msdn.microsoft.com/en-us/library/ie/hh779017%28v=vs.85%29.aspx

Also work on your accept rate..seems too low..

like image 79
Rajesh Avatar answered Nov 19 '25 04:11

Rajesh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!