question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Progressive rendering not working

See original GitHub issue

Attach (recommended) or Link to PDF file here:

Configuration:

  • Web browser and its version: Chrome 65.0.3325.181
  • Operating system and its version: Mac OSX 10.13.3
  • PDF.js version: 2.0.449
  • Is a browser extension: no

What is the expected behavior?

I have a linearized PDF, and a server returning accept-ranges: bytes. I expect the PDF to be progressively loaded/rendered, and to observe Range requests with 206 response codes, but instead no Range request is made, and the whole PDF is loaded and rendered in bulk.

I read a lot of other issues and responses related to Range requests, but I still cannot find what is wrong in my setup. CORS headers are OK, Accept-Ranges header is returned by the server, Range requests are supported (as tested with CURL).

Two specific things in my setup are:

  • accept-ranges is lower case (PDF is on Google Cloud Storage). But headers should be case insensitive.
  • The original request for the PDF responds with a 302 redirect to the actual file URL. Could this confuse PDFJS, as the redirect does not contain accept-ranges?
screen shot 2018-03-28 at 8 09 47 pm

As you can see, the Accept-Ranges header is properly returned:

screen shot 2018-03-28 at 8 10 18 pm

Any idea?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:5

github_iconTop GitHub Comments

2reactions
Gabri-connectcommented, May 11, 2018

bump - Having same issue

1reaction
angel-langdoncommented, Jun 30, 2022

Could we get a confirmation one way or another on whether lower-case headers don’t work and should be supported according to the RFC specs?

@kentingnguyen I can confirm you that lowercase headers do not make a difference. I was able to achieve progressive rendering by correctly implementing my backend logic

Related issue https://github.com/mozilla/pdf.js/issues/14514

image

My backend implementation in Python using range requests, maybe you can translate it to Java https://stackoverflow.com/a/71309270/12234006

Another related issue https://github.com/wojtekmaj/react-pdf/issues/419#issuecomment-1025149091

Read more comments on GitHub >

github_iconTop Results From Across the Web

unable to do progressive rendering - Stack Overflow
Try adding Transfer-Encoding : chunked developer.mozilla.org/en-US/docs/Web/HTTP/Headers/… – Andy Ray · Thanks. However, it didn't work for me.
Read more >
Issues with Bucket rendering, not with progressive render
Hello, I have some scenes since some month where i'm not able to render all the animations frames with Buckets rendering. But it's...
Read more >
Progressive refine not working? - Blender Artists
I've enabled progressive refine but every time I render it stops at 512 samples? Do I have to increase my actual render parameter...
Read more >
Progressive Rendering Guidelines - Salesforce Help
Here are some guidelines for how to get the most out of Progressive Rendering.Required Editions Available in: Enterprise, Performance, Unlimited, and Deve.
Read more >
Redshift Quick Tip: Render Faster with Progressive Mode
In this video, you'll learn how to speed up your workflow by using progressive rendering instead of unified sampling.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found