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 x0 = bbox[0],
      y0 = bbox[1],
      x1 = bbox[2],
      y1 = bbox[3];
    
    const matrixScale = Util.singularValueDecompose2dScale(this.matrix);
    const curMatrixScale = Util.singularValueDecompose2dScale(
      this.baseTransform
    );
    const combinedScale = [
      matrixScale[0] * curMatrixScale[0],
      matrixScale[1] * curMatrixScale[1],
    ];
    
    
    
    const dimx = this.getSizeAndScale(
      xstep,