Closed nickiepucel closed 1 month ago
Hi,
You do get occassional differences between browser and rendered PDF, it's impossible to get them perfectly the same.
However, in this case I'm wondering if it's because you are using -
, and the browser might be considering this for a word split where the PDF renderer may not...
Comparison of editor mode then PDF using no spaces (top left), spaces (bottom left), hypens (top-right):
Designer:
PDF:
So it does appear to be specific to hyphens, and it makes sense when looking at the code.
Further tests and it seems that the browser treats hyphen exactly the same as space and so should we.
Designer
I'll write a PR for this soon
This issue is fixed by #451 Released as pdfme@3.4.3
Describe the bug
When you have a really long, single word in a textbox, the way it is wrapped in the PDF Preview is different than in the PDF when it is generated.
To Reproduce
This is reproducible in the Address Label Maker demo app.
Observe how the text is wrapped in the Preview
Click Download
Notice how the word wrapping appears differently in the generated PDF
Expected behavior
The word should be wrapped in the same way in both the preview PDF and generated PDF
Your Environment
Your Error Log
Additional context
none