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

pdfmake

Package Overview
Dependencies
Maintainers
4
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pdfmake - npm Package Compare versions

Comparing version 0.1.32 to 0.1.33

12

package.json
{
"name": "pdfmake",
"version": "0.1.32",
"version": "0.1.33",
"description": "Client/server side PDF printing in pure JavaScript",

@@ -11,3 +11,3 @@ "main": "src/printer.js",

"pdfkit": "^0.8.3",
"iconv-lite": "^0.4.18",
"iconv-lite": "^0.4.19",
"linebreak": "^0.3.0",

@@ -22,3 +22,3 @@ "lodash": "^4.17.4"

"gulp-replace": "^0.6.1",
"gulp-sourcemaps": "^2.6.0",
"gulp-sourcemaps": "^2.6.1",
"gulp-spawn-mocha": "^3.3.1",

@@ -31,4 +31,4 @@ "gulp-uglify": "^2.1.2",

"json-loader": "^0.5.7",
"sinon": "^2.4.1",
"mocha": "^3.4.2",
"sinon": "^3.3.0",
"mocha": "^3.5.3",
"jshint": "^2.9.5",

@@ -38,3 +38,3 @@ "string-replace-webpack-plugin": "^0.1.3",

"brfs": "^1.4.3",
"webpack": "^3.4.1",
"webpack": "^3.6.0",
"webpack-stream": "^3.2.0"

@@ -41,0 +41,0 @@ },

@@ -143,2 +143,7 @@ # pdfmake [![Build Status][travis_img]][travis_url] [![GitHub][github_img]][github_url] [![npm][npm_img]][npm_url] [![Bower][bower_img]][bower_url] [![Packagist][packagist_img]][packagist_url] [![CDNJS][cdnjs_img]][cndjs_url]

Open in same window:
```js
pdfMake.createPdf(docDefinition).open({}, window);
```
#### Print the PDF

@@ -164,2 +169,7 @@ ```js

Print in same window:
```js
pdfMake.createPdf(docDefinition).print({}, window);
```
#### Put the PDF into your own page as URL data

@@ -166,0 +176,0 @@ ```js

@@ -215,7 +215,12 @@ /* jslint node: true */

var body = [];
var textStyle = node.toc.textStyle || {};
var numberStyle = node.toc.numberStyle || textStyle;
var textMargin = node.toc.textMargin || [0, 0, 0, 0];
for (var i = 0, l = node.toc._items.length; i < l; i++) {
var item = node.toc._items[i];
var lineStyle = node.toc._items[i].tocStyle || textStyle;
var lineMargin = node.toc._items[i].tocMargin || textMargin;
body.push([
{text: item.text, alignment: 'left'},
{text: '00000', alignment: 'right', _tocItemRef: item}
{text: item.text, alignment: 'left', style: lineStyle, margin: lineMargin},
{text: '00000', alignment: 'right', _tocItemRef: item, style: numberStyle, margin: [0, lineMargin[1], 0, lineMargin[3]]}
]);

@@ -433,3 +438,3 @@ }

if (!item.ol && !item.ul) {
item.listMarker = this.buildUnorderedMarker(style, node._gapSize, node.type);
item.listMarker = this.buildUnorderedMarker(style, node._gapSize, item.listType || node.type);
}

@@ -462,3 +467,3 @@

if (!item.ol && !item.ul) {
item.listMarker = this.buildOrderedMarker(item.counter || counter, style, node.type, node.separator);
item.listMarker = this.buildOrderedMarker(item.counter || counter, style, item.listType || node.type, node.separator);
if (item.listMarker._inlines) {

@@ -465,0 +470,0 @@ node._gapSize.width = Math.max(node._gapSize.width, item.listMarker._inlines[0].width);

@@ -126,2 +126,6 @@ /* jslint node: true */

if (node.text && node.text.text) {
node.text = [this.preprocessNode(node.text)];
}
return node;

@@ -128,0 +132,0 @@ };

@@ -142,2 +142,10 @@ /* jslint node: true */

function normalizeTextArray(array, styleContextStack) {
function flatten(array) {
return array.reduce(function (prev, cur) {
var current = Array.isArray(cur.text) ? flatten(cur.text) : cur;
var more = [].concat(current).some(Array.isArray);
return prev.concat(more ? flatten(current) : current);
}, []);
}
var results = [];

@@ -149,2 +157,4 @@

array = flatten(array);
for (var i = 0, l = array.length; i < l; i++) {

@@ -151,0 +161,0 @@ var item = array[i];

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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