pdf-lib-extended 1.0.15 → 1.0.17

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.15",
3
+ "version": "1.0.17",
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": {
@@ -485,7 +485,7 @@ class PDFLibExtended {
485
485
  let currentWidth = 0;
486
486
  let currentLine = "";
487
487
 
488
- if(wordWrap){
488
+ if(defaultOptions.wordWrap){
489
489
  text = text.split(" ");
490
490
  }else{
491
491
  text = text.split("");
@@ -511,8 +511,10 @@ class PDFLibExtended {
511
511
  currentWidth = 0;
512
512
  }
513
513
 
514
- if(wordWrap){
514
+ if(defaultOptions.wordWrap){
515
515
  currentLine += string + " ";
516
+ }else{
517
+ currentLine += string;
516
518
  }
517
519
  currentWidth += wordWidth;
518
520