pdf-lib-extended 1.0.27 → 1.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/PDFLibExtended.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pdf-lib-extended",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.28",
|
|
4
4
|
"description": "This project extends the capabilities of the pdf-lib JavaScript library by providing a set of helper functions that simplify common PDF manipulation tasks. It includes utilities for drawing and formatting text, images, and shapes within PDF documents, allowing for more advanced customization and automation. The class-based architecture, designed as a toolkit, ensures that developers can easily integrate these enhanced features into their existing workflows. With this extension, users can streamline the creation of dynamic and complex PDFs with minimal effort.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": {
|
package/src/PDFLibExtended.js
CHANGED
|
@@ -573,7 +573,7 @@ class PDFLibExtended {
|
|
|
573
573
|
/*** TEXT ***/
|
|
574
574
|
let change = page.getY();
|
|
575
575
|
this.drawParagraph(text, {range: {left: x, right: x + width}, align: defaultOptions.align, size: defaultOptions.size, color: defaultOptions.color});
|
|
576
|
-
change -= page.getY() - defaultOptions.size;
|
|
576
|
+
change -= page.getY() - defaultOptions.size - 4;
|
|
577
577
|
|
|
578
578
|
/*** BACKGROUND ***/
|
|
579
579
|
if(defaultOptions.backgroundColor !== null){
|
|
@@ -596,7 +596,7 @@ class PDFLibExtended {
|
|
|
596
596
|
page.moveTo(x, y);
|
|
597
597
|
change = page.getY();
|
|
598
598
|
this.drawParagraph(text, {range: {left: x, right: x + width}, align: defaultOptions.align, size: defaultOptions.size, color: defaultOptions.color});
|
|
599
|
-
change -= page.getY() - defaultOptions.size;
|
|
599
|
+
change -= page.getY() - defaultOptions.size - 4;
|
|
600
600
|
|
|
601
601
|
y += defaultOptions.size;
|
|
602
602
|
|