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 d671df1 commit 21631fbCopy full SHA for 21631fb
How to/Library Bounds to Viewer Bounds/src/app/app.ts
@@ -45,6 +45,9 @@ pdfviewer.exportSuccess = (args: { exportData: string }) => {
45
// Converting PDF Library values into PDF Viewer values.
46
rect = {
47
x: (parseInt(data.rect.x) * 96) / 72,
48
+
49
+ // Converting pageHeight from pixels(PDF Viewer) to points(PDF Library) for accurate positioning
50
+ // The conversion factor of 72/96 is used to change pixel values to points
51
y: (pageHeight * 72 / 96 - parseInt(data.rect.height)) * 96 / 72,
52
width: (parseInt(data.rect.width) - parseInt(data.rect.x)) * 96 / 72,
53
height: (parseInt(data.rect.height) - parseInt(data.rect.y)) * 96 / 72,
0 commit comments