Skip to content

Commit 939e653

Browse files
834573: updated comments
1 parent b28b59b commit 939e653

File tree

1 file changed

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

1 file changed

+3
-0
lines changed

How to/Library Bounds to Viewer Bounds/PDFViewerSample/PDFViewerSample/Pages/Index.cshtml

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

0 commit comments

Comments
 (0)