Comparing version 0.2.8 to 0.2.9
# Changelog | ||
## 0.2.9 - 2024-01-01 | ||
- Added padding option for QR code | ||
- Allow the document language to be specified | ||
- Fixed cover image size inside table | ||
- Fixed "Cannot read properties of undefined (reading 'bottomMost')" if table contains too few rows | ||
- Fixed invalid source-maps in builded js file | ||
## 0.2.8 - 2023-11-09 | ||
@@ -4,0 +12,0 @@ |
{ | ||
"name": "pdfmake", | ||
"version": "0.2.8", | ||
"version": "0.2.9", | ||
"description": "Client/server side PDF printing in pure JavaScript", | ||
@@ -37,2 +37,3 @@ "main": "src/printer.js", | ||
"sinon": "^11.1.1", | ||
"source-map-loader": "^4.0.1", | ||
"stream-browserify": "^3.0.0", | ||
@@ -39,0 +40,0 @@ "string-replace-webpack-plugin": "^0.1.3", |
@@ -167,2 +167,5 @@ /*eslint no-unused-vars: ["error", {"args": "none"}]*/ | ||
node._height = dimensions.height * factor; | ||
} else if (node.cover) { | ||
node._width = node._minWidth = node._maxWidth = node.cover.width; | ||
node._height = node._minHeight = node._maxHeight = node.cover.height; | ||
} else { | ||
@@ -169,0 +172,0 @@ node._width = node._minWidth = node._maxWidth = node.width || dimensions.width; |
@@ -128,2 +128,3 @@ /*eslint no-unused-vars: ["error", {"args": "none"}]*/ | ||
permissions: docDefinition.permissions, | ||
lang: docDefinition.language, | ||
fontLayoutCache: isBoolean(options.fontLayoutCache) ? options.fontLayoutCache : true, | ||
@@ -130,0 +131,0 @@ bufferPages: options.bufferPages || false, |
@@ -746,2 +746,3 @@ /*eslint no-unused-vars: ["error", {"args": "none"}]*/ | ||
var foreground = options.foreground || '#000'; | ||
var padding = options.padding || 0; | ||
//var margin = options.margin || 4; | ||
@@ -751,3 +752,4 @@ var matrix = generateFrame(data, options); | ||
var modSize = Math.floor(options.fit ? options.fit / n : 5); | ||
var size = n * modSize; | ||
var size = (n * modSize) + (modSize * padding * 2); | ||
var paddingXY = modSize * padding; | ||
@@ -764,4 +766,4 @@ canvas.push({ | ||
type: 'rect', | ||
x: modSize * j, | ||
y: modSize * i, | ||
x: modSize * j + paddingXY, | ||
y: modSize * i + paddingXY, | ||
w: modSize, | ||
@@ -768,0 +770,0 @@ h: modSize, |
@@ -28,2 +28,6 @@ 'use strict'; | ||
this.headerRows = tableNode.table.headerRows || 0; | ||
if (this.headerRows > tableNode.table.body.length) { | ||
throw new Error(`Too few rows in the table. Property headerRows requires at least ${this.headerRows}, contains only ${tableNode.table.body.length}`); | ||
} | ||
this.rowsWithoutPageBreak = this.headerRows + (tableNode.table.keepWithHeaderRows || 0); | ||
@@ -30,0 +34,0 @@ this.dontBreakRows = tableNode.table.dontBreakRows || false; |
@@ -81,3 +81,3 @@ 'use strict'; | ||
default: | ||
throw 'Unkown decoration : ' + group.decoration; | ||
throw 'Unknown decoration : ' + group.decoration; | ||
} | ||
@@ -84,0 +84,0 @@ pdfKitDoc.save(); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
84555
13215865
29