Merge remote branch 'upstream/master'

This commit is contained in:
Rob Sayre 2011-07-05 16:06:10 -07:00
commit 3ad0c0b654
4 changed files with 13 additions and 4 deletions

View File

@ -139,9 +139,9 @@ var CipherTransform = (function() {
},
decryptString: function(s) {
var cipher = new this.stringCipherConstructor();
var data = string2bytes(s);
var data = stringToBytes(s);
data = cipher.encryptBlock(data);
return bytes2string(data);
return bytesToString(data);
}
};
return constructor;

6
pdf.js
View File

@ -2842,7 +2842,7 @@ var Page = (function() {
constructor.prototype = {
getPageProp: function(key) {
return this.pageDict.get(key);
return this.xref.fetchIfRef(this.pageDict.get(key));
},
inheritPageProp: function(key) {
var dict = this.pageDict;
@ -3566,6 +3566,7 @@ var CanvasGraphics = (function() {
},
execute: function(code, xref, resources) {
resources = xref.fetchIfRef(resources) || new Dict();
var savedXref = this.xref, savedRes = this.res, savedXobjs = this.xobjs;
this.xref = xref;
this.res = resources || new Dict();
@ -3579,6 +3580,7 @@ var CanvasGraphics = (function() {
},
compile: function(stream, xref, resources, fonts) {
resources = xref.fetchIfRef(resources) || new Dict();
var xobjs = xref.fetchIfRef(resources.get("XObject")) || new Dict();
var parser = new Parser(new Lexer(stream), false);
@ -4452,7 +4454,7 @@ var ColorSpace = (function() {
break;
case "Indexed":
var base = ColorSpace.parse(cs[1], xref, res);
var hiVal = cs[2];
var hiVal = cs[2] + 1;
var lookup = xref.fetchIfRef(cs[3]);
return new IndexedCS(base, hiVal, lookup);
case "Lab":

View File

@ -0,0 +1 @@
http://www.unicode.org/charts/PDF/U10450.pdf

View File

@ -26,6 +26,12 @@
"rounds": 1,
"type": "load"
},
{ "id": "shavian-load",
"file": "pdfs/shavian.pdf",
"link": true,
"rounds": 1,
"type": "load"
},
{ "id": "sizes",
"file": "pdfs/sizes.pdf",
"rounds": 1,