diff --git a/pdf.js b/pdf.js index a7de0bb35..f61250a0c 100644 --- a/pdf.js +++ b/pdf.js @@ -2458,13 +2458,7 @@ var CanvasGraphics = (function() { var tokens = []; var token = ""; - var length = cmapObj.length; - if (cmapObj instanceof FlateStream) { - cmapObj.readBlock(); - length = cmapObj.bufferLength; - } - - var cmap = cmapObj.getBytes(length); + var cmap = cmapObj.getBytes(cmapObj.length); for (var i =0; i < cmap.length; i++) { var byte = cmap[i]; if (byte == 0x20 || byte == 0x0A || byte == 0x3C || byte == 0x3E) {