Let's pull ratio/scale from some other settings (e.g. canvas._pixelRatio or even canvas._defaultTransform) -- some days we may stop relaying on window.devicePixelRation in viewer.js. This settings can be specified somewhere https://github.com/mozilla/pdf.js/blob/master/web/viewer.js#L2051 .