OpenOffice includes the optional reference to a Font dictionary in the Resources dictionary. This breaks SetFont in pdf.js as the Font in this.res is not a dictionary but an xref.

This commit is contained in:
Adil Allawi 2011-07-05 23:14:20 +01:00
parent ca039d7c7c
commit a6f4a92286

2
pdf.js
View File

@ -3803,7 +3803,7 @@ var CanvasGraphics = (function() {
this.current.leading = leading;
},
setFont: function(fontRef, size) {
var font = this.res.get("Font");
var font = this.xref.fetchIfRef(this.res.get("Font"));
if (!IsDict(font))
return;