Closed Bug 1713266 Opened 4 years ago Closed 1 year ago

PDF with single large page shows no content

Categories

(Firefox :: PDF Viewer, defect, P2)

defect

Tracking

()

VERIFIED FIXED
138 Branch
Tracking Status
firefox138 --- verified
firefox139 --- verified

People

(Reporter: mt, Unassigned)

References

()

Details

(Whiteboard: [pdfjs-canvas-size])

Not sure what is going on here, but it doesn't render any content. The document is a single page.

Works fine in Chromium-based browsers (Edge from testing, Chrome from others' reports).

Severity: -- → S2
Priority: -- → P2
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:96.0) Gecko/20100101 Firefox/96.0 (nightly)

I tried to open the pdf and it doesn't render any content, but when changing the scaling from "automatic" to 10%, it took some 20 sec but then I saw a rendered page.

Might be related with https://bugzilla.mozilla.org/show_bug.cgi?id=1588435 ?

the console output:

Beim Darstellen der Seite trat ein Fehler auf.
PDF.js Version 2.12.126 (build: e1a35e7bb)
Nachricht:
Aufrufliste: beginDrawing@resource://pdf.js/build/pdf.js:5437:26
initializeGraphics@resource://pdf.js/build/pdf.js:3906:14
__webpack_modules__</render/<@resource://pdf.js/build/pdf.js:2472:26
viewer.js:1181:15
_otherError resource://pdf.js/web/viewer.js:1181
renderView: "[Exception... "Failure" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: resource://pdf.js/build/pdf.js :: beginDrawing :: line 5437" data: no]" viewer.js:4127:19
renderView resource://pdf.js/web/viewer.js:4127

I can reproduce this on macOS 11.6 (blank 1-page document in displayed Firefox, multi-page document renders successfully in Chrome).

Whiteboard: [pdfjs-canvas-size]

@THausherr on Github says my issue is a different one https://github.com/mozilla/pdf.js/issues/6741#issuecomment-1036492219

Flags: needinfo?(cdenizet)

If I understand correctly, the problem is slightly different but the root cause is the same: the canvas is too big.
If I unzoom enough the pdf (at 10%) I get:

Crash Annotation GraphicsCriticalError: |[G0][GFX1-]: Attempting to allocate a texture of size 164x30237 above the limit, trimming (t=2199.35) [GFX1-]: Attempting to allocate a texture of size 164x30237 above the limit, trimming

So we're still hitting this issue we've with canvas limits.

Flags: needinfo?(cdenizet)

Opening the pdf file in Acrobat gives a warning
(in german) "Fehler: Die Abmessungen dieser Seite liegen ausserhalb des zulässigen Wertebereiches. Bestimmte Seiteninhalte werden unter Umständen nicht angezeigt."

-> which means the size of the page are too large, parts of the document will possibly not be displayed.

Maybe we should add a similiar warning, if we can predict such a behavior.

Depends on: 1943094
Depends on: 1492303
See Also: 1492303
OS: Windows 10 → All
Hardware: x86_64 → All
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 138 Branch
Flags: qe-verify+

Issue is reproducible on a 2022-08-04 Firefox Nightly build on Windows 10.
Verified as fixed on Firefox Nightly 139.0a1 and Firefox 138.0b2 on Windows 10, Ubuntu 22, macOS 14.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.