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

pdfkit

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

pdfkit - npm Package Compare versions

Comparing version 0.2.4 to 0.2.5

js/font/data/data/Courier-Bold.afm

3

js/mixins/text.js

@@ -129,3 +129,4 @@ (function() {

this.y = y || this.y;
} else {
}
if (options.lineBreak !== false) {
margins = this.page.margins;

@@ -132,0 +133,0 @@ if ((_ref = options.width) == null) {

@@ -11,3 +11,3 @@ (function() {

PDFObject = (function() {
var pad;
var pad, swapBytes;

@@ -54,4 +54,20 @@ function PDFObject() {}

swapBytes = function(buff) {
var a, i, l, _ref;
l = buff.length;
if (l & 0x01) {
throw new Error("Buffer length must be even");
} else {
for (i = 0, _ref = l - 1; i < _ref; i += 2) {
a = buff[i];
buff[i] = buff[i + 1];
buff[i + 1] = a;
}
}
return buff;
};
PDFObject.s = function(string) {
string = string.replace(/\\/g, '\\\\\\\\').replace(/\(/g, '\\(').replace(/\)/g, '\\)').replace(/&lt;/g, '<').replace(/&gt;/g, '>').replace(/&amp;/g, '&');
string = swapBytes(new Buffer('\ufeff' + string, 'ucs-2')).toString('binary');
return {

@@ -58,0 +74,0 @@ isString: true,

@@ -5,3 +5,3 @@ {

"keywords": ["pdf", "pdf writer", "pdf generator", "graphics", "document", "vector"],
"version": "0.2.4",
"version": "0.2.5",
"homepage": "http://pdfkit.org/",

@@ -8,0 +8,0 @@ "author": {

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