Can't enable progressive rendering (i.e. range-request download)
See original GitHub issueLink to PDF file (or attach file here): out.pdf
Configuration:
- Web browser and its version: Google Chrome 58.0.3029.110 (64-bit)
- Operating system and its version: Debian GNU/Linux 9.0 (stretch)
- PDF.js version: 1.8.188
- Is an extension: no
PDFJS doesn’t initiate range request, just downloads the whole file, however, server have range request support:
curl -s -H "Range: bytes=500-1000" -D - http://localhost:3000/api/files/7/preview/file.pdf -o /dev/null
HTTP/1.1 206 Partial Content
Connection: keep-alive
Set-Cookie: csrf-token=yaP9VNyKqYQ5Cs903x45WpiVhYvD8lbUX%2FtIQeG8ZrV1L%2Fq6LdI7ApKn7LFW9a%2F%2BuzGrmQSU3o8rB6c0;Path=/
Set-Cookie: ring-session=9PbMnYqfDK7frq%2BKLMjC3AOMGURDSm%2BNHhQy8voCTsdk4692%2FDJDhxm5oBm89prB%2FnSTVOnqSTItdC176rzdm%2BVNd2Ck3YX2xk9Bbi5%2FtJiPjGRzHk6ifsNfIwR5Nyi4ZnVhCa03tD%2FsUo6dVBjWlffiIGsS2x%2F836IXTMGM90mrz5PtRZLQIeaIED91Ehd64ip0MWhlAWBuFMDy4%2BVeog%3D%3D--pfr0sATxg5WkppYe2MKp4ih%2BUMNoXkMQIRPhRf6aUzk%3D;Path=/;HttpOnly;Max-Age=31536000
Content-Range: bytes 500-1000/2568004
Server: undertow
Content-Length: 501
Date: Fri, 19 May 2017 05:01:08 GMT
But in network console I see:
out.pdf 200 xhr Other 2.4 MB
I’ve done linearization with qpdf --linearize
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
Progressive loading - MuPDF
What is progressive loading? The idea of progressive loading is that as you download a PDF file into a browser, you can display...
Read more >How to set range header from client with pdf.js? - Stack Overflow
The entire pdf file is getting downloaded in a single request. Now, I would like to do progressive loading (downloading by specifying the...
Read more >Should I enable progressive download? - VEGAS Community
Progressive download option is used when you want to host your video on your web server. It simply moves a few mp4 headers...
Read more >Optimize WebFont loading and rendering - web.dev
This post explains how to load WebFonts to prevent layout shifts and blank pages when WebFonts are not available when the page loads....
Read more >Render Settings Explained - Quality vs. Render Time
Subdivs parameter for the Bucket or Progressive Image Sampler. If you can't get the desired quality, try decreasing the Noise Threshold ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Also, is it possible that you forgot to set
Content-Range
orContent-Length
properly?hey @vickyatjoy, unfortunately not sure what is the reason in your case. It depends on your setup and could be something like apache\nginx proxy cuts the headers. But in my case NGINX proxy doesn’t cut anything by default.
Take a look at what headers it sends\returns on your local server. In my case it was (taken from chrome netwrok console):