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 b6dad1b commit 4c978daCopy full SHA for 4c978da
How to/Library Bounds to Viewer Bounds/src/App.vue
@@ -56,6 +56,9 @@ export default {
56
// Converting PDF Library values into PDF Viewer values.
57
const rect = {
58
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
62
y: (parseInt(pageHeight) * 72 / 96 - parseInt(data.rect.height)) * 96 / 72,
63
width: (parseInt(data.rect.width) - parseInt(data.rect.x)) * 96 / 72,
64
height: (parseInt(data.rect.height) - parseInt(data.rect.y)) * 96 / 72,
0 commit comments