Socket
Socket
Sign inDemoInstall

pdfjs

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pdfjs - npm Package Compare versions

Comparing version 2.2.0 to 2.3.0

4

CHANGELOG.md

@@ -7,2 +7,6 @@ # Changelog

## [2.3.0] - 2019-05-07
### Changed
- setTemplate now accepts an second optional parameter indicating whether the templates is to used for the first page only #126
## [2.2.0] - 2019-04-02

@@ -9,0 +13,0 @@ ### Fixed

8

lib/document.js

@@ -406,2 +406,6 @@ 'use strict'

this._contents.length = 0
if (this._template && this._template.firstPageOnly) {
this._template = null
}
}

@@ -652,3 +656,3 @@

setTemplate(external) {
setTemplate(external, firstPageOnly = false) {
if (!(external instanceof ExternalDocument)) {

@@ -659,3 +663,3 @@ throw new TypeError('argument must be of type ExternalDocument')

this._begin(null)
this._pending.push(() => external.setAsTemplate(this))
this._pending.push(() => external.setAsTemplate(this, firstPageOnly))
}

@@ -662,0 +666,0 @@

@@ -87,3 +87,3 @@ 'use strict'

async setAsTemplate(doc) {
async setAsTemplate(doc, firstPageOnly) {
await doc._endPage()

@@ -155,2 +155,4 @@

}
doc._template.firstPageOnly = firstPageOnly
}

@@ -157,0 +159,0 @@ }

{
"name": "pdfjs",
"author": "Markus Ast <npm.m@rkusa.st>",
"version": "2.2.0",
"version": "2.3.0",
"description": "A Portable Document Format (PDF) generation library targeting both the server- and client-side.",

@@ -22,11 +22,11 @@ "keywords": [

"opentype.js": "^0.11.0",
"pako": "^1.0.8",
"readable-stream": "^3.1.1",
"unorm": "^1.4.1",
"pako": "^1.0.10",
"readable-stream": "^3.3.0",
"unorm": "^1.5.0",
"uuid": "^3.3.2"
},
"devDependencies": {
"@types/node": "^10.12.23",
"tape": "^4.9.2",
"typescript": "^3.3.3"
"@types/node": "^10.14.6",
"tape": "^4.10.1",
"typescript": "^3.4.5"
},

@@ -33,0 +33,0 @@ "repository": {

@@ -122,4 +122,5 @@ declare module "pdfjs" {

* @param external The external document to merge
* @param firstPageOnly default: false, if true the template will only be used for the first page.
*/
setTemplate(external: ExternalDocument): void;
setTemplate(external: ExternalDocument, firstPageOnly?: boolean): void;

@@ -126,0 +127,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