Open Bug 986450 Opened 10 years ago Updated 2 years ago

Top and bottom images are not displayed in pdf file

Categories

(Firefox :: PDF Viewer, defect, P3)

defect

Tracking

()

People

(Reporter: phorea, Unassigned)

Details

(Whiteboard: [pdfjs-rendering][pdfjs-smask])

Attachments

(4 files)

Attached image pdf.png
Reproducible on:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0
Reproducible on latest Firefox 29 beta 1 (20140318013849), latest Aurora 30.0a2 (20140319004002) and latest Nightly 31.0a1 (20140320030203).

Steps to reproduce:
1. Open the pdf: http://www.unifem.org/attachments/products/EVAWkit_05_Factsheet_SafeCitites_en.pdf and check the images from the top and the bottom 

Actual results:
The top image is cropped and the bottom one is missing.
There are no errors in the web console.

Expected results:
The images are displayed.

Notes:
1. The issue also reproduces on Ubuntu 32-bit and Mac OS X 10.8.5.
2. The issue is not reproducible on Firefox 28, so it's a recent regression. Please see the regression range below:
mozilla-central
Last good revision: 5e0a22097bff (2014-01-31)
First bad revision: 8840c133115a (2014-02-01)
Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=5e0a22097bff&tochange=8840c133115a

mozilla-inbound
Last good revision: acadb164dbc5
First bad revision: 1cdb63b010bb
Pushlog:
http://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=acadb164dbc5&tochange=1cdb63b010bb

Seems to be regressed by bug 965861.
Blocks: 965861
Mac OSX Preview matches PDF.js output. Looks like something wrong with the PDF.js since some viewers cannot handle it well too. What Adobe Reader displays?
No longer blocks: 965861
(In reply to Yury Delendik (:yury) from comment #1)
> Looks like something wrong with the
> PDF.js since some viewers cannot handle it well too.

Correction, Looks like something wrong with the PDF document
Yury, the pdf is displayed fine in Firefox 28. Please see the attachment, the upper side is the view from Chrome.
Attached image Mac OSX Preview
I'm not saying we are not going to closing it as won't fix. I'm just saying that it can be a problem with the PDF (attaching Preview screenshot). The https://github.com/mozilla/pdf.js/pull/4161 fixes missing functionality, but this particular PDF expresses some weird corner case or contains incorrect data.
pdf.js bisect:

4054b0c3858aed93823cd503bbcd04043fd178ab is the first bad commit
commit 4054b0c3858aed93823cd503bbcd04043fd178ab
Author: Yury Delendik <ydelendik@mozilla.com>
Date:   Thu Jan 23 11:13:32 2014 -0600
    SMask emulation
:040000 040000 2c804a733cf732e2529391455aa51b767513c103 715c419d2f272a9dfc08cb644501ab57c98338b7 M	src
Priority: -- → P3
Whiteboard: [pdfjs-c-rendering][pdfjs-d-smask]

This is a simplified PDF with only the image in it.

Confirming the bug in Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0

No errors or warnings in the console.

As this image is jpx coded, it is probably related to https://github.com/mozilla/pdf.js/issues/6967

(In reply to Kenan from comment #8)

As this image is jpx coded, it is probably related to https://github.com/mozilla/pdf.js/issues/6967

Please note that this bug, as well as the referenced issue, is purely a Soft Mask problem (and not related to e.g. image conversion).
That can be seen by modifying the PDF.js source-code to temporarily skip the /SMask-handling, which causes the entire image to render.

Whiteboard: [pdfjs-c-rendering][pdfjs-d-smask] → [pdfjs-rendering][pdfjs-smask]
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: