vue-pdf-eurlanda
Advanced tools
Comparing version 1.0.12 to 1.0.13
{ | ||
"name": "vue-pdf-eurlanda", | ||
"version": "1.0.12", | ||
"version": "1.0.13", | ||
"description": "vue.js pdf viewer", | ||
@@ -5,0 +5,0 @@ "main": "src/vuePdfNoSss.vue", |
@@ -230,3 +230,7 @@ import { CMapCompressionType } from 'pdfjs-dist/lib/shared/util'; | ||
var docWidth = document.getElementById(container).offsetWidth; | ||
console.log("------屏幕宽度------"); | ||
console.log(docWidth); | ||
var scale = docWidth / pdfPage.getViewport(1).width * (window.devicePixelRatio || 1); | ||
console.log("实际高度:" + canvasElt.offsetHeight); | ||
console.log("计算后的高度:" + pdfPage.getViewport(1).height * scale); | ||
//如果按照宽度计算下来的比例。大于容器的高度,那么按照容器高度来进行比例计算 | ||
@@ -233,0 +237,0 @@ if (pdfPage.getViewport(1).height * scale > canvasElt.offsetHeight) { |
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
32529
536