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

vue-pdf

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-pdf - npm Package Compare versions

Comparing version 3.2.3 to 3.3.0

2

package.json
{
"name": "vue-pdf",
"version": "3.2.3",
"version": "3.3.0",
"description": "vue.js pdf viewer",

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

@@ -69,3 +69,6 @@ # vue-pdf

#### @link-clicked <sup>Number<sup>
Triggered when an internal link is clicked
### Public methods

@@ -239,3 +242,3 @@

<div v-if="loadedRatio > 0 && loadedRatio < 1" style="background-color: green; color: white; text-align: center" :style="{ width: loadedRatio * 100 + '%' }">{{ Math.floor(loadedRatio * 100) }}%</div>
<pdf v-if="show" ref="pdf" style="border: 1px solid red" :src="src" :page="page" :rotate="rotate" @password="password" @progress="loadedRatio = $event" @error="error" @num-pages="numPages = $event"></pdf>
<pdf v-if="show" ref="pdf" style="border: 1px solid red" :src="src" :page="page" :rotate="rotate" @password="password" @progress="loadedRatio = $event" @error="error" @num-pages="numPages = $event" @link-clicked="page = $event"></pdf>
</div>

@@ -242,0 +245,0 @@ </div>

import { CMapCompressionType } from 'pdfjs-dist/lib/shared/util';
import { PDFLinkService } from 'pdfjs-dist/lib/web/pdf_link_service';

@@ -244,3 +245,13 @@ export default function(PDFJS) {

clearAnnotations();
var viewer = {
scrollPageIntoView: ({ pageNumber }) => {
emitEvent('link-clicked', pageNumber)
},
};
let linkService = new PDFLinkService();
linkService.setDocument(pdfDoc);
linkService.setViewer(viewer);
pdfPage.getAnnotations()

@@ -254,4 +265,4 @@ .then(function(annotations) {

page: pdfPage,
//linkService: new LinkServiceMock(),
renderInteractiveForms: false,
linkService: linkService,
renderInteractiveForms: false
});

@@ -258,0 +269,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