Skip to content

Commit 21631fb

Browse files
834573: updated comments
1 parent d671df1 commit 21631fb

File tree

1 file changed

+3
-0
lines changed
  • How to/Library Bounds to Viewer Bounds/src/app

1 file changed

+3
-0
lines changed

How to/Library Bounds to Viewer Bounds/src/app/app.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ pdfviewer.exportSuccess = (args: { exportData: string }) => {
4545
// Converting PDF Library values into PDF Viewer values.
4646
rect = {
4747
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
4851
y: (pageHeight * 72 / 96 - parseInt(data.rect.height)) * 96 / 72,
4952
width: (parseInt(data.rect.width) - parseInt(data.rect.x)) * 96 / 72,
5053
height: (parseInt(data.rect.height) - parseInt(data.rect.y)) * 96 / 72,

0 commit comments

Comments
 (0)