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.

unreachable("Should not call beginImageData");
    }
    paintFormXObjectBegin(matrix, bbox) {
      if (!this.contentVisible) {
        return;
      }
      this.save();
      this.baseTransformStack.push(this.baseTransform);
      if (Array.isArray(matrix) && matrix.length === 6) {
        this.transform.apply(this, matrix);
      }
      this.baseTransform = this.ctx.mozCurrentTransform;
      if (bbox) {
        const width = bbox[2] - bbox[0];
        const height = bbox[3] - bbox[1];
        this.ctx.rect(bbox[0], bbox[1], width, height);
        this.clip();
        this.endPath();
      }
    }
    paintFormXObjectEnd() {
      if (!this.contentVisible) {
        return;
      }
      this.restore();
      this.baseTransform = this.baseTransformStack.pop();
    }
    beginGroup(group) {