We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 56af223 commit e77b06eCopy full SHA for e77b06e
How to/Library Bounds to Viewer bounds/index.js
@@ -36,7 +36,11 @@ pdfviewer.exportSuccess = function (args) {
36
// Converting PDF Library values into PDF Viewer values.
37
var rect = {
38
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
42
y: (parseInt(pageHeight) * 72 / 96 - parseInt(data.rect.height)) * 96 / 72,
43
44
width: (parseInt(data.rect.width) - parseInt(data.rect.x)) * 96 / 72,
45
height: (parseInt(data.rect.height) - parseInt(data.rect.y)) * 96 / 72,
46
};
0 commit comments