pdfkit-table
Advanced tools
Comparing version 0.1.87 to 0.1.88
@@ -149,3 +149,4 @@ // jshint esversion: 6 | ||
// font size | ||
this.fillColor('black').font("Helvetica").fontSize(8).fontSize(size).opacity(opacity).fill(); | ||
this.fillColor('black').fontSize(8).fontSize(size).opacity(opacity).fill(); | ||
// this.fillColor('black').font("Helvetica").fontSize(8).fontSize(size).opacity(opacity).fill(); | ||
@@ -165,3 +166,7 @@ // const titleHeight = this.heightOfString(data, { | ||
// title object | ||
data.label && this.fontSize( data.fontSize || size ).text( data.label, startX, startY ); | ||
data.fontFamily && this.font( data.fontFamily ); | ||
data.label && this.fillColor( data.color || 'black').fontSize( data.fontSize || size ).text( data.label, startX, startY ).fill(); | ||
startY = this.y + columnSpacing + 2; | ||
} | ||
@@ -168,0 +173,0 @@ }; |
{ | ||
"name": "pdfkit-table", | ||
"version": "0.1.87", | ||
"version": "0.1.88", | ||
"description": "PdfKit Table. Helps to draw informations in simple tables using pdfkit. #server-side. Generate pdf tables with javascript (PDFKIT plugin) ", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -28,2 +28,4 @@ <p align="center"> | ||
[![NPM](https://nodei.co/npm/pdfkit-table.png)](https://www.npmjs.com/package/pdfkit-table) | ||
```bash | ||
@@ -282,4 +284,4 @@ npm install pdfkit-table | ||
-----------------------|-----------------------|--------------------|-------------------| | ||
| **title** | <code>String</code> | undefined | title | | ||
| **subtitle** | <code>String</code> | undefined | subtitle | | ||
| **title** | <code>String | Object</code> | undefined | title | | ||
| **subtitle** | <code>String | Object</code> | undefined | subtitle | | ||
| **width** | <code>Number</code> | undefined | width of table | | ||
@@ -302,4 +304,4 @@ | **x** | <code>Number</code> | undefined / doc.x | position x (left) | | ||
// properties | ||
title: "Title", | ||
subtitle: "Subtitle", | ||
title: "Title", // { label: 'Title', fontSize: 30, color: 'blue', fontFamily: "./fonts/type.ttf" }, | ||
subtitle: "Subtitle", // { label: 'Subtitle', fontSize: 20, color: 'green', fontFamily: "./fonts/type.ttf" }, | ||
width: 500, // {Number} default: undefined // A4 595.28 x 841.89 (portrait) (about width sizes) | ||
@@ -391,2 +393,13 @@ x: 0, // {Number} default: undefined | doc.x | ||
### 0.1.88 | ||
- Fix header font family or title object | ||
- Thanks ***@RastaGrzywa*** | ||
```js | ||
let localType = "./font/Montserrat-Regular.ttf"; | ||
const table = { | ||
title: { label: 'Title Object 2', fontSize: 30, color: 'blue', fontFamily: localType }, | ||
} | ||
``` | ||
### 0.1.87 | ||
@@ -393,0 +406,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
53298
5
796
632