I want to use the vue-pdf library that is an implementation of pdfjs for vuejs 2.x in order to do the following
and the tricky parts are
Currently there are no examples in the repo to show case these.
After fiddling around with the library, I managed to do achieve the rendering of a pdf from a protected endpoint using the following approach
responseType: 'blob'
<pdf>
component I have created a Pull Request to the vue-pdf repository with a working example. In the PR replace the URL of axios
request with a REST endpoint that returns an octet-stream
and you should be all good.
The resulting pdf viewer shown below