pdfkit-table
Advanced tools
Comparing version 0.1.59 to 0.1.60
22
index.js
@@ -23,3 +23,3 @@ // jshint esversion: 6 | ||
*/ | ||
addBackground ({x, y, width, height}, fillColor, fillOpacity) { | ||
addBackground ({x, y, width, height}, fillColor, fillOpacity, callback) { | ||
@@ -30,2 +30,5 @@ // validate | ||
// save current style | ||
this.save(); | ||
// draw bg | ||
@@ -40,7 +43,12 @@ this | ||
// back to saved style | ||
this.restore(); | ||
// restore | ||
this | ||
.fillColor('black') | ||
.fillOpacity(1) | ||
.fill(); | ||
// this | ||
// .fillColor('black') | ||
// .fillOpacity(1) | ||
// .fill(); | ||
typeof callback === 'function' && callback(this); | ||
@@ -83,4 +91,4 @@ } | ||
const prepareHeader = options.prepareHeader || (() => this.font("Helvetica-Bold").fontSize(8)); | ||
const prepareRow = options.prepareRow || ((row, indexColumn, indexRow, rectRow) => this.font("Helvetica").fontSize(8)); | ||
const prepareHeader = options.prepareHeader || (() => this.fillColor('black').font("Helvetica-Bold").fontSize(8).fill()); | ||
const prepareRow = options.prepareRow || ((row, indexColumn, indexRow, rectRow) => this.fillColor('black').font("Helvetica").fontSize(8).fill()); | ||
@@ -87,0 +95,0 @@ const maxY = this.page.height - (this.page.margins.top + this.page.margins.bottom); |
{ | ||
"name": "pdfkit-table", | ||
"version": "0.1.59", | ||
"version": "0.1.60", | ||
"description": "PdfKit Table. Helps to draw informations in simple tables using pdfkit. #server-side. Generate pdf tables with javascript (PDFKIT plugin) ", | ||
@@ -26,4 +26,5 @@ "main": "index.js", | ||
"dependencies": { | ||
"pdfkit": "latest" | ||
"pdfkit": "latest", | ||
"underscore": "^1.13.1" | ||
} | ||
} |
@@ -383,2 +383,8 @@ # pdfkit-table | ||
### 0.1.60 | ||
+ add callbak on addBackground function, add .save() and .restore() style. | ||
+ header font color | ||
- Thanks @dev-fema | ||
### 0.1.59 | ||
@@ -385,0 +391,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
36148
528
544
2
+ Addedunderscore@^1.13.1
+ Addedunderscore@1.13.7(transitive)