PDF.js displays blurry plots in PDF documents, e.g.

http://arxiv.org/pdf/1202.5344v1.pdf

When viewed in Chrome or Adobe Acrobat all the plots show sharp-edged squares. When viewed in Preview or PDF.js, all the squares show as blurry pixelated blobs.

const ctx = this.ctx;
      let patternTransform = null;
      if (isPatternFill) {
        patternTransform = getAdjustmentTransformation(
          ctx.mozCurrentTransform,
          width,
          height
        );
      }
      maskCtx.fillStyle = isPatternFill
        ? fillColor.getPattern(maskCtx, this, false, patternTransform)
        : fillColor;
      maskCtx.fillRect(0, 0, width, height);
      maskCtx.restore();
      for (let i = 0, ii = positions.length; i < ii; i += 2) {
        ctx.save();
        ctx.transform(
          scaleX,
          skewX,
          skewY,
          scaleY,
          positions[i],
          positions[i + 1]
        );
        ctx.scale(1, -1);
        ctx.drawImage(maskCanvas.canvas, 0, 0, width, height, 0, -1, 1, 1);
        ctx.restore();
      }
    }
    paintImageMaskXObjectGroup(images) {