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 b28b59b commit 939e653Copy full SHA for 939e653
How to/Library Bounds to Viewer Bounds/PDFViewerSample/PDFViewerSample/Pages/Index.cshtml
@@ -46,6 +46,9 @@
46
// Converting PDF Library values into PDF Viewer values.
47
var rect = {
48
x: (parseInt(data.rect.x) * 96) / 72,
49
+
50
+ // Converting pageHeight from pixels(PDF Viewer) to points(PDF Library) for accurate positioning
51
+ // The conversion factor of 72/96 is used to change pixel values to points
52
y: (parseInt(pageHeight) * 72 / 96 - parseInt(data.rect.height)) * 96 / 72,
53
width: (parseInt(data.rect.width) - parseInt(data.rect.x)) * 96 / 72,
54
height: (parseInt(data.rect.height) - parseInt(data.rect.y)) * 96 / 72,
0 commit comments