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.38 to 1.0.39

2

package.json

@@ -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 @@

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