Handle missing encoding differences array
This commit is contained in:
parent
7df39bb065
commit
31d64af855
18
pdf.js
18
pdf.js
@ -4324,14 +4324,16 @@ var PartialEvaluator = (function() {
|
|||||||
baseEncoding = Encodings[baseName.name].slice();
|
baseEncoding = Encodings[baseName.name].slice();
|
||||||
|
|
||||||
// Load the differences between the base and original
|
// Load the differences between the base and original
|
||||||
var diffEncoding = encoding.get('Differences');
|
if (encoding.has('Differences')) {
|
||||||
var index = 0;
|
var diffEncoding = encoding.get('Differences');
|
||||||
for (var j = 0; j < diffEncoding.length; j++) {
|
var index = 0;
|
||||||
var data = diffEncoding[j];
|
for (var j = 0; j < diffEncoding.length; j++) {
|
||||||
if (IsNum(data))
|
var data = diffEncoding[j];
|
||||||
index = data;
|
if (IsNum(data))
|
||||||
else
|
index = data;
|
||||||
differences[index++] = data.name;
|
else
|
||||||
|
differences[index++] = data.name;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if (IsName(encoding)) {
|
} else if (IsName(encoding)) {
|
||||||
baseEncoding = Encodings[encoding.name].slice();
|
baseEncoding = Encodings[encoding.name].slice();
|
||||||
|
1
test/pdfs/txt2pdf.pdf.link
Normal file
1
test/pdfs/txt2pdf.pdf.link
Normal file
@ -0,0 +1 @@
|
|||||||
|
http://www.sanface.com/pdf/test.pdf
|
@ -133,5 +133,11 @@
|
|||||||
"link": true,
|
"link": true,
|
||||||
"rounds": 1,
|
"rounds": 1,
|
||||||
"type": "load"
|
"type": "load"
|
||||||
|
},
|
||||||
|
{ "id": "txt2pdf",
|
||||||
|
"file": "pdfs/txt2pdf.pdf",
|
||||||
|
"link": true,
|
||||||
|
"rounds": 1,
|
||||||
|
"type": "load"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user