pdf-lib-extended 1.0.43 → 1.0.44
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 +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pdf-lib-extended",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.44",
|
|
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
|
@@ -419,7 +419,7 @@ class PDFLibExtended {
|
|
|
419
419
|
opacity: defaultOptions.opacity
|
|
420
420
|
});
|
|
421
421
|
if(defaultOptions.textDecoration === "underline"){
|
|
422
|
-
this.
|
|
422
|
+
this.getCurrentPage().drawLine({
|
|
423
423
|
start: { x: this.getCurrentPage().getX(), y: this.getCurrentPage().getY() - 2 },
|
|
424
424
|
end: { x: this.getCurrentPage().getX() + this.getCurrentFont().widthOfTextAtSize(text, defaultOptions.size), y: this.getCurrentPage().getY() - 2 },
|
|
425
425
|
thickness: 1,
|
|
@@ -446,7 +446,7 @@ class PDFLibExtended {
|
|
|
446
446
|
opacity: defaultOptions.opacity
|
|
447
447
|
});
|
|
448
448
|
if(defaultOptions.textDecoration === "underline"){
|
|
449
|
-
this.
|
|
449
|
+
this.getCurrentPage().drawLine({
|
|
450
450
|
start: { x: xCenterPosition, y: this.getCurrentPage().getY() - 2 },
|
|
451
451
|
end: { x: xCenterPosition + this.getCurrentFont().widthOfTextAtSize(text, defaultOptions.size), y: this.getCurrentPage().getY() - 2 },
|
|
452
452
|
thickness: 1,
|
|
@@ -473,7 +473,7 @@ class PDFLibExtended {
|
|
|
473
473
|
opacity: defaultOptions.opacity
|
|
474
474
|
});
|
|
475
475
|
if(defaultOptions.textDecoration === "underline"){
|
|
476
|
-
this.
|
|
476
|
+
this.getCurrentPage().drawLine({
|
|
477
477
|
start: { x: xRightPosition, y: this.getCurrentPage().getY() - 2 },
|
|
478
478
|
end: { x: xRightPosition + textWidth, y: this.getCurrentPage().getY() - 2 },
|
|
479
479
|
thickness: 1,
|