Skip to content

Commit 4c978da

Browse files
834573: updated comments
1 parent b6dad1b commit 4c978da

File tree

1 file changed

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

1 file changed

+3
-0
lines changed

How to/Library Bounds to Viewer Bounds/src/App.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ export default {
5656
// Converting PDF Library values into PDF Viewer values.
5757
const rect = {
5858
x: (parseInt(data.rect.x) * 96) / 72,
59+
60+
// Converting pageHeight from pixels(PDF Viewer) to points(PDF Library) for accurate positioning
61+
// The conversion factor of 72/96 is used to change pixel values to points
5962
y: (parseInt(pageHeight) * 72 / 96 - parseInt(data.rect.height)) * 96 / 72,
6063
width: (parseInt(data.rect.width) - parseInt(data.rect.x)) * 96 / 72,
6164
height: (parseInt(data.rect.height) - parseInt(data.rect.y)) * 96 / 72,

0 commit comments

Comments
 (0)