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.14 to 1.0.15

2

package.json
{
"name": "vue-pdf-eurlanda",
"version": "1.0.14",
"version": "1.0.15",
"description": "vue.js pdf viewer",

@@ -5,0 +5,0 @@ "main": "src/vuePdfNoSss.vue",

@@ -59,3 +59,3 @@ import { CMapCompressionType } from 'pdfjs-dist/lib/shared/util';

var canvasElt = document.createElement('canvas');
canvasElt.style.display = 'block';
canvasElt.style = { 'display': flex, 'justify-content': 'center' };
canvasElt.style.width = '100%';

@@ -84,3 +84,2 @@ canvasParent.appendChild(canvasElt);

this.setCanvasHeight = function(h) {
console.log("setCanvasHeight:" + h);
canvasElt.style.height = h

@@ -233,7 +232,3 @@ }

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);
//如果按照宽度计算下来的比例。大于容器的高度,那么按照容器高度来进行比例计算

@@ -250,3 +245,2 @@ if (pdfPage.getViewport(1).height * scale > canvasElt.offsetHeight) {

canvasElt.height = viewport.height;
console.log("给canvas赋值:" + viewport.height);
canvasElt.style.width = viewport.width + "px";

@@ -253,0 +247,0 @@ canvasElt.style.height = viewport.height + "px";

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