Relorer / HTMLToQPDF

HTMLToQPDF is an extension for QuestPDF that allows to generate PDF from HTML
MIT License
80 stars 26 forks source link

Blank spaces removed before and after formatting tags like <b> #8

Open dasilro opened 1 year ago

dasilro commented 1 year ago

Hi I've found a problem happend in a situation like this:

sit, amet consectetur adipisicing elit.

The result is that the system removes the whitespace before the b tag.

To be sure I've tested it with the example project like this:

image

With the result:

image

As you can see in the image the whitespace before the bold has disappeared.

Looking for the reason we found in the ParagraphComponent.cs class two trims that apparently generates the issue:

image

I really don't know the code, but it seems the system generates a quest pdf component for each tag and the "b" tag is included in this Paragraph component.

Maybe those trims shouldn't be applied in line formatting elements like b, i etc.

AnderssonPeter commented 9 months ago

Hi have the same issue, but it only seems to happen on the first b tag? This is a <b>sentence</b> with a <b>few</b> words <b>where</b> spaces are missing. is rendered as image