QuestPDF / QuestPDF

QuestPDF is a modern open-source .NET library for PDF document generation. Offering comprehensive layout engine powered by concise and discoverable C# Fluent API. Easily generate PDF reports, invoices, exports, etc.
https://www.questpdf.com
Other
11.65k stars 604 forks source link

[HELP] Implicit white space when font size increases #810

Closed lehanEngelbrecht closed 6 months ago

lehanEngelbrecht commented 6 months ago

I am trying to create retail shelf labels, but my only issue is that there is a implicit padding when I increase the font size and I would thus like to get rid of the implicit padding since the text below the value should be 'closer' to the larger text above it. Please see both pictures attached for as reference to my current code and the generated pdf. (Please not my code is in F# but it is basically the same as C#)

Screenshot 2024-03-07 at 09 33 21 Screenshot 2024-03-07 at 09 37 15
girlpunk commented 6 months ago

I haven't recreated your layout, however this is likely because vertical space is reserved for characters that extend above and below the baseline. As a workaround, you could apply some negative top padding to the second line of text, however note that this may cause unexpected overlaps with some text