Skip to content

Commit e77b06e

Browse files
834573: comments update.
1 parent 56af223 commit e77b06e

File tree

1 file changed

+4
-0
lines changed
  • How to/Library Bounds to Viewer bounds

1 file changed

+4
-0
lines changed

How to/Library Bounds to Viewer bounds/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@ pdfviewer.exportSuccess = function (args) {
3636
// Converting PDF Library values into PDF Viewer values.
3737
var rect = {
3838
x: (parseInt(data.rect.x) * 96) / 72,
39+
40+
// Converting pageHeight from pixels(PDF Viewer) to points(PDF Library) for accurate positioning
41+
// The conversion factor of 72/96 is used to change pixel values to points
3942
y: (parseInt(pageHeight) * 72 / 96 - parseInt(data.rect.height)) * 96 / 72,
43+
4044
width: (parseInt(data.rect.width) - parseInt(data.rect.x)) * 96 / 72,
4145
height: (parseInt(data.rect.height) - parseInt(data.rect.y)) * 96 / 72,
4246
};

0 commit comments

Comments
 (0)