You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
React-PDF should include these headers in its requests.
Let's take this pdf for example. It is optimized for web view (checked in Adobe Reader => file => properties). Google Cloud storage seems to support Range headers.
Ideally, only the currently selected page of a PDF is downloaded. This makes initial rendering faster, since only the first page has to be fetched.
PDF.js (the underlying library) does support this.
I think the problem is present in one of these requirements:
Let's take this pdf for example. It is optimized for web view (checked in Adobe Reader => file => properties). Google Cloud storage seems to support Range headers.
Maybe the problem has something to do with the redirect, since the first URL is redirected to https://storage.googleapis.com/ori-static/api.notubiz.nl/document/6131301. In the response header,
accept-ranges: bytes
is present. In the request, I can't see arange
header.This seems to work:
So... The problem is probably with react-pdf.
react-pdf does support a
PDFDataRangeTransport
object as a prop forfile
, but I'm not quite sure on how to use this prop (docs).The text was updated successfully, but these errors were encountered: