Skip to content

Commit

Permalink
[pdf] Fix sizes for stamps previews
Browse files Browse the repository at this point in the history
  • Loading branch information
KhromovNikita committed Dec 12, 2024
1 parent 755c70b commit 2775c09
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pdf/src/previews.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
function(window, undefined) {

function StampAnnotPreviewManager() {
this.canvasHeight = 28;
}

StampAnnotPreviewManager.prototype.clear = function() {
Expand Down Expand Up @@ -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();

Expand Down

0 comments on commit 2775c09

Please sign in to comment.