diff --git a/pdf/src/previews.js b/pdf/src/previews.js index f288b3c5dc..eef90f273b 100644 --- a/pdf/src/previews.js +++ b/pdf/src/previews.js @@ -40,6 +40,7 @@ function(window, undefined) { function StampAnnotPreviewManager() { + this.canvasHeight = 28; } StampAnnotPreviewManager.prototype.clear = function() { @@ -94,7 +95,9 @@ let pxWidth = oTextDrawer.Width * g_dKoef_mm_to_pix; let pxHeight = oTextDrawer.Height * g_dKoef_mm_to_pix; - let canvas = this.createCanvas(pxWidth, pxHeight); + let canvasWidth = pxWidth * this.canvasHeight / pxHeight; + + let canvas = this.createCanvas(canvasWidth, this.canvasHeight); let ctx = canvas.getContext('2d'); let graphics = new AscCommon.CGraphics();