1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 01:58:06 +02:00

Merge pull request #1009 from notmasteryet/issue-1001

Fix stitching function; media box fix
This commit is contained in:
Brendan Dahl 2011-12-30 18:25:19 -08:00
commit 78f7354dc7
5 changed files with 17 additions and 6 deletions

View file

@ -270,7 +270,6 @@ var PDFFunction = (function PDFFunctionClosure() {
constructStiched: function pdfFunctionConstructStiched(fn, dict, xref) {
var domain = dict.get('Domain');
var range = dict.get('Range');
if (!domain)
error('No domain');
@ -279,13 +278,13 @@ var PDFFunction = (function PDFFunctionClosure() {
if (inputSize != 1)
error('Bad domain for stiched function');
var fnRefs = dict.get('Functions');
var fnRefs = xref.fetchIfRef(dict.get('Functions'));
var fns = [];
for (var i = 0, ii = fnRefs.length; i < ii; ++i)
fns.push(PDFFunction.getIR(xref, xref.fetchIfRef(fnRefs[i])));
var bounds = dict.get('Bounds');
var encode = dict.get('Encode');
var bounds = xref.fetchIfRef(dict.get('Bounds'));
var encode = xref.fetchIfRef(dict.get('Encode'));
return [CONSTRUCT_STICHED, domain, bounds, encode, fns];
},