From a6f4a9228671983665684f1aaf1563f26154d50a Mon Sep 17 00:00:00 2001 From: Adil Allawi Date: Tue, 5 Jul 2011 23:14:20 +0100 Subject: [PATCH] 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. --- pdf.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdf.js b/pdf.js index a9f0ee935..132d16ec1 100644 --- a/pdf.js +++ b/pdf.js @@ -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;