MGrin / mgr-pdf-viewer-react

React PDF Viewer component
MIT License
72 stars 24 forks source link

How to get file on document load success from url? #38

Closed smaidah closed 4 years ago

MGrin commented 4 years ago

@smaidah what do you mean by file path? If you provide thee url, this url is the path to the file, there is no other path

MGrin commented 4 years ago

There is no way of getting a file, this lib is only to show the pdf. If you need to get the file you'll have to download it separately. One of the approaches would be to download the file first, and then base64 encode it and pass as base64 to the viewer, this way you download file only once

I'm closing this ticket as this functionality is not supposed by this lib, but if you really want it - feel free to create a PR! :)