pdf-lib-extended 1.0.22 → 1.0.23

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pdf-lib-extended",
3
- "version": "1.0.22",
3
+ "version": "1.0.23",
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": {
@@ -481,7 +481,7 @@ class PDFLibExtended {
481
481
  };
482
482
 
483
483
  // Always move to paragraph start (left edge of range)
484
- this.getCurrentPage().moveTo(defaultOptions.range.left, pdf.getCurrentPage().getY());
484
+ this.getCurrentPage().moveTo(defaultOptions.range.left, this.getCurrentPage().getY());
485
485
 
486
486
  const maxWidth = defaultOptions.range.right - defaultOptions.range.left;
487
487
 
@@ -509,7 +509,7 @@ class PDFLibExtended {
509
509
  range: defaultOptions.range
510
510
  });
511
511
  this.nextLine(defaultOptions.padding);
512
- this.getCurrentPage().moveTo(defaultOptions.range.left, pdf.getCurrentPage().getY());
512
+ this.getCurrentPage().moveTo(defaultOptions.range.left, this.getCurrentPage().getY());
513
513
  currentLine = tok; // start new line with the token (no leading space)
514
514
  currentWidth = this.getCurrentFont().widthOfTextAtSize(tok, defaultOptions.size);
515
515
  } else {