Skip to content

Commit 0b94df0

Browse files
834573: updated argument for getPageInfo
1 parent a3137fd commit 0b94df0

File tree

1 file changed

+2
-2
lines changed
  • How to/Library Bounds to Viewer bounds

1 file changed

+2
-2
lines changed

How to/Library Bounds to Viewer bounds/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pdfviewer.exportSuccess = function (args) {
1919
shapeAnnotationData.map(data => {
2020
if (data && data.rect && parseInt(data.rect.width)) {
2121

22-
var pageHeight = pdfviewer.getPageInfo(pdfviewer.currentPageNumber).height;
22+
var pageHeight = pdfviewer.getPageInfo(parseInt(data.page)).height;
2323

2424
// Converting PDF Library values into PDF Viewer values.
2525
var rect = {
@@ -35,7 +35,7 @@ pdfviewer.exportSuccess = function (args) {
3535
const [endX, endY] = data.end.split(',').map(Number);
3636

3737
// Convert to PDF Viewer coordinates
38-
var pageHeight = pdfviewer.getPageInfo(pdfviewer.currentPageNumber).height;
38+
var pageHeight = pdfviewer.getPageInfo(parseInt(data.page)).height;
3939
const pdfStartX = (startX * 96) / 72;
4040
const pdfStartY = (parseInt(pageHeight) - startY) * 96 / 72;
4141
const pdfEndX = (endX * 96) / 72;

0 commit comments

Comments
 (0)