mozilla / pdf.js

PDF Reader in JavaScript
https://mozilla.github.io/pdf.js/
Apache License 2.0
48.33k stars 9.97k forks source link

[Bug]: Fast Web View says No even if PDF is linearized #18520

Closed catmanjan closed 2 months ago

catmanjan commented 2 months ago

Attach (recommended) or Link to PDF file

https://d2tkmshiozsr4v.cloudfront.net/documents/files/000/041/350/original/ad41798557504b40d26e11b4f059c0945bb5ca14/750614main_NASA_FY_2014_Budget_Estimates-508.pdf

Web browser and its version

Google Chrome

Operating system and its version

Windows 11

PDF.js version

master

Is the bug present in the latest PDF.js version?

Yes

Is a browser extension

No

Steps to reproduce the problem

  1. Load supplied PDF with PDF.js
  2. Click Document Properties...
  3. Notice Fast Web View says No image

What is the expected behavior?

Should say Yes

What went wrong?

image

Link to a viewer

No response

Additional context

No response

Snuffleupagus commented 2 months ago

Notice Fast Web View says No

And so does Adobe Reader as well, i.e. the PDF reference implementation, since the /Linearized dictionary in the PDF document is unfortunately corrupt. More precisely, its /L-entry doesn't equal the length of the file; note https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF32000_2008.pdf#G19.1043548

adobe

catmanjan commented 2 months ago

@Snuffleupagus do you have an example of a working linearized PDF? I tried several

Snuffleupagus commented 2 months ago

https://github.com/mozilla/pdf.js/blob/master/test/pdfs/pdf.pdf.link points to a correctly linearized PDF document.