super-pdfkit
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -90,7 +90,8 @@ 'use strict'; | ||
} | ||
const marginedPageWidth = this.page.width - ( this.page.margins.left + this.page.margins.right ); | ||
options = { | ||
width: this.page.width - ( this.page.margins.left + this.page.margins.right ), | ||
width: marginedPageWidth, | ||
...options | ||
}; | ||
return this.image( img, ( this.page.width - options.width ) / 2, y, options ); | ||
return this.image( img, ( marginedPageWidth - options.width ) / 2 + this.page.margins.left, y, options ); | ||
} | ||
@@ -97,0 +98,0 @@ textCenter( txt, y = this.y, options = {} ) { |
{ | ||
"name": "super-pdfkit", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "Enhanced pdfkit with some useful methods (thx to: pdfkit and pdfkit-table authors)", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
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
67632
173