Closed Bug 845783 Opened 13 years ago Closed 13 years ago

Broken pdf.js rendering (image transparency)

Categories

(Firefox :: PDF Viewer, defect)

19 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

()

VERIFIED FIXED
Firefox 22

People

(Reporter: martin.koegler, Assigned: RyanVM)

References

Details

Attachments

(1 file)

Attached file Testcase.pdf
The attached PDF contains transparent graphics. pdf.js (released Firefox 19.0) renders the images with a random background color (in contrast to Acrobat Reader).
Looks like a dupe of bug 843321
Attachment #718940 - Attachment mime type: application/octet-stream → application/pdf
In my option, it is a different issue. In bug 843321, the text is displayed opaque instead of being semitransparent. In my testcase, the viewer replaces the transparent background with a different, random color at each (re-)load. It looks like it is related to the security features of the PDF document.
I think, that I found the bug in the pdf.js sources: diff --git a/src/parser.js b/src/parser.js index 6b09686..570203f 100644 --- a/src/parser.js +++ b/src/parser.js @@ -60,7 +60,7 @@ var Parser = (function ParserClosure() { this.shift(); var array = []; while (!isCmd(this.buf1, ']') && !isEOF(this.buf1)) - array.push(this.getObj()); + array.push(this.getObj(cipherTransform)); if (isEOF(this.buf1)) error('End of file inside array'); this.shift();
Depends on: 848641
Assignee: nobody → ryanvm
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 22
Mozilla/5.0 (Windows NT 6.1; rv:22.0) Gecko/20130312 Firefox/22.0, Build ID: 20130312031046 Verified the fix on latest Nightly.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: