vue-pdf-eurlanda
Advanced tools
Comparing version 1.0.38 to 1.0.39
@@ -31,3 +31,3 @@ { | ||
"scripts": {}, | ||
"version": "1.0.38" | ||
"version": "1.0.39" | ||
} |
@@ -233,9 +233,12 @@ import { CMapCompressionType } from 'pdfjs-dist/lib/shared/util'; | ||
console.log(pdfPage.getViewport(1).width, pdfPage.getViewport(1).height); | ||
var scale = docWidth / pdfPage.getViewport(1).width * (window.devicePixelRatio || 1); | ||
var scale = docWidth / pdfPage.getViewport(1).width; | ||
//如果按照宽度计算下来的比例。大于容器的高度,那么按照容器高度来进行比例计算 | ||
if (pdfPage.getViewport(1).height * scale > docOffset) { | ||
scale = docOffset / pdfPage.getViewport(1).height * (window.devicePixelRatio || 1); | ||
scale = docOffset / pdfPage.getViewport(1).height; | ||
} | ||
console.log("------计算后的比例------"); | ||
console.log(scale); | ||
var viewport = pdfPage.getViewport(scale, rotate); | ||
console.log("----计算后的数值------"); | ||
console.log(viewport.width, viewport.height); | ||
emitEvent('page-size', viewport.width, viewport.height); | ||
@@ -242,0 +245,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32874
544