My problem is the following:
I use PDF.js
to display a .pdf
on a website. However the .pdf
must be included from some url
. That means, that if one downloads the website for offline purposes, the .pdf
will not be included and therefore can not be displayed. Thus I wonder, whether it is possible to embed the .pdf
(eg in an html
-container), so that it can be found by PDF.js
. In this case, offline mode would be easy to achieve.
You can load the file into memory and then use URL.createObjectURL()
to create an URL for that object
I think this can't be achieved without using a localhost (or a browser plugin etc.).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.