super-pdfkit
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -58,4 +58,10 @@ 'use strict'; | ||
textCenter( txt, y = this.y ) { | ||
return this.text( txt, this.page.margins.left, y, { align: 'center' } ); | ||
return this.text( txt, this.x, y, { align: 'center' } ); | ||
} | ||
textLeft( txt, y = this.y ) { | ||
return this.text( txt, this.x, y, { align: 'left' } ); | ||
} | ||
textRight( txt, y = this.y ) { | ||
return this.text( txt, this.x, y, { align: 'right' } ); | ||
} | ||
end( endingCallback = undefined ) { | ||
@@ -62,0 +68,0 @@ let endingLength = 0; |
{ | ||
"name": "super-pdfkit", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Enhanced pdfkit with some useful methods (thx to: pdfkit and pdfkit-table authors)", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -32,2 +32,6 @@ # super-pdfkit | ||
doc.textCenter( // TO ADD A LEFT ALIGNED TEXT | ||
'LEFT ALIGNED TEXT', // the text | ||
200 // the y position | ||
); | ||
doc.textCenter( // TO ADD A CENTERED TEXT | ||
@@ -37,2 +41,6 @@ 'CENTERED TEXT', // the text | ||
); | ||
doc.textRight( // TO ADD A RIGHT ALIGNED TEXT | ||
'RIGHT ALIGNED TEXT', // the text | ||
200 // the y position | ||
); | ||
@@ -39,0 +47,0 @@ doc.imageCenter( // TO ADD A CENTERED IMAGE |
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
41878
109
67