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.

width,
            height
          );
        }
        maskCtx.fillStyle = isPatternFill
          ? fillColor.getPattern(maskCtx, this, false, patternTransform)
          : fillColor;
        maskCtx.fillRect(0, 0, width, height);
        maskCtx.restore();
        ctx.save();
        ctx.transform.apply(ctx, image.transform);
        ctx.scale(1, -1);
        ctx.drawImage(maskCanvas.canvas, 0, 0, width, height, 0, -1, 1, 1);
        ctx.restore();
      }
    }
    paintImageXObject(objId) {
      if (!this.contentVisible) {
        return;
      }
      const imgData = objId.startsWith("g_")
        ? this.commonObjs.get(objId)
        : this.objs.get(objId);
      if (!imgData) {
        warn("Dependent image isn't ready yet");
        return;
      }
      this.paintInlineImageXObject(imgData);
    }
    paintImageXObjectRepeat(objId, scaleX, scaleY, positions) {