return obj;
return this.fetch(obj);
},
- fetch: function(ref) {
+ fetch: function(ref, suppressEncryption) {
var num = ref.num;
var e = this.cache[num];
if (e)
}
error('bad XRef entry');
}
- if (this.encrypt) {
+ if (this.encrypt && !suppressEncryption) {
e = parser.getObj(this.encrypt.createCipherTransform(num, gen));
} else {
e = parser.getObj();
}
if (type == 'TrueType' && dict.has('ToUnicode') && differences) {
- var cmapObj = xref.fetchIfRef(dict.get('ToUnicode'));
+ var cmapObj = dict.get('ToUnicode');
+ if (IsRef(cmapObj)) {
+ cmapObj = xref.fetch(cmapObj, true);
+ }
if (IsName(cmapObj)) {
error('ToUnicode file cmap translation not implemented');
} else if (IsStream(cmapObj)) {