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.

if (!this.contentVisible) {
        return;
      }
      const ctx = this.ctx;
      const fillColor = this.current.fillColor;
      const isPatternFill = this.current.patternFill;
      for (let i = 0, ii = images.length; i < ii; i++) {
        const image = images[i];
        const width = image.width,
          height = image.height;
        const maskCanvas = this.cachedCanvases.getCanvas(
          "maskCanvas",
          width,
          height
        );
        const maskCtx = maskCanvas.context;
        maskCtx.save();
        putBinaryImageMask(maskCtx, image);
        maskCtx.globalCompositeOperation = "source-in";
        let patternTransform = null;
        if (isPatternFill) {
          patternTransform = getAdjustmentTransformation(
            ctx.mozCurrentTransform,