Replies: 3 comments 1 reply
-
@AliOsm You have to implement all by yourself to support Range Request unless you use the default viewer somehow. Even if you use the default viewer, the server must also be configured to support Range Request correctly. For those who use the default viewer and still suffer this issue, go through the checklist to ensure your server was configured correctly:
If you ensure all these were configured correctly, then you can debug the code block step by step to find out what's the real issue. pdf.js/src/display/fetch_stream.js Lines 130 to 168 in f6b356e |
Beta Was this translation helpful? Give feedback.
-
I finally got mine working, I can probably help you - how are you setting disableAutoFetch and disableRange? I recently discovered that the URL hash params are not read by default |
Beta Was this translation helpful? Give feedback.
-
Actually I changed from the code above to use the default viewer. It is better and handles more functionalities. Thanks for your help all! |
Beta Was this translation helpful? Give feedback.
-
Hello everyone, I'm using
pdfjs-dist
version3.11.174
using Yarn, and I have the following StimulusJS controller in my Rails application:The controller uses PDF.js library to load and display PDF files. It is working fine, with 1 issue, the PDF.js library is not using range requests, so it is loading the whole PDF file at once, which is an issue for big PDF file. How to solve this?
I'm searching for a solution for 2 days now, I tried all suggestions related to
disableAutoFetch
anddisableStream
, with no success.Beta Was this translation helpful? Give feedback.
All reactions