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.

entry.h,
          0,
          -1,
          1,
          1
        );
        if (this.imageLayer) {
          const position = this.getCanvasPosition(entry.x, entry.y);
          this.imageLayer.appendImage({
            imgData,
            left: position[0],
            top: position[1],
            width: w,
            height: h,
          });
        }
        ctx.restore();
      }
    }
    paintSolidColorImageMask() {
      if (!this.contentVisible) {
        return;
      }
      this.ctx.fillRect(0, 0, 1, 1);
    }
    
    markPoint(tag) {
      
    }
    markPointProps(tag, properties) {