Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-pdf-eurlanda

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-pdf-eurlanda - npm Package Compare versions

Comparing version 1.0.35 to 1.0.36

2

package.json

@@ -31,3 +31,3 @@ {

"scripts": {},
"version": "1.0.35"
"version": "1.0.36"
}

@@ -124,2 +124,4 @@ import resizeSensor from 'vue-resize-sensor'

let docheight = document.getElementById(this.container).offsetHeight;
console.log("-------获取的高度----------");
console.log(docheight);
this.pdf.setCanvasHeight(docheight + "px");

@@ -126,0 +128,0 @@ this.pdf.loadDocument(this.src);

@@ -230,6 +230,7 @@ import { CMapCompressionType } from 'pdfjs-dist/lib/shared/util';

var docWidth = document.getElementById(container).offsetWidth;
var docOffset = document.getElementById(container).offsetHeight;
var scale = docWidth / pdfPage.getViewport(1).width * (window.devicePixelRatio || 1);
//如果按照宽度计算下来的比例。大于容器的高度,那么按照容器高度来进行比例计算
if (pdfPage.getViewport(1).height * scale > canvasElt.offsetHeight) {
scale = canvasElt.offsetHeight / pdfPage.getViewport(1).height * (window.devicePixelRatio || 1);
scale = docOffset / pdfPage.getViewport(1).height * (window.devicePixelRatio || 1);
}

@@ -236,0 +237,0 @@ var viewport = pdfPage.getViewport(scale, rotate);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc