Handle missing encoding differences array

This commit is contained in:
= 2011-09-20 15:42:52 -07:00
parent 7df39bb065
commit 31d64af855
3 changed files with 17 additions and 8 deletions

18
pdf.js
View File

@ -4324,14 +4324,16 @@ var PartialEvaluator = (function() {
baseEncoding = Encodings[baseName.name].slice();
// Load the differences between the base and original
var diffEncoding = encoding.get('Differences');
var index = 0;
for (var j = 0; j < diffEncoding.length; j++) {
var data = diffEncoding[j];
if (IsNum(data))
index = data;
else
differences[index++] = data.name;
if (encoding.has('Differences')) {
var diffEncoding = encoding.get('Differences');
var index = 0;
for (var j = 0; j < diffEncoding.length; j++) {
var data = diffEncoding[j];
if (IsNum(data))
index = data;
else
differences[index++] = data.name;
}
}
} else if (IsName(encoding)) {
baseEncoding = Encodings[encoding.name].slice();

View File

@ -0,0 +1 @@
http://www.sanface.com/pdf/test.pdf

View File

@ -133,5 +133,11 @@
"link": true,
"rounds": 1,
"type": "load"
},
{ "id": "txt2pdf",
"file": "pdfs/txt2pdf.pdf",
"link": true,
"rounds": 1,
"type": "load"
}
]