Quote of the Day

more Quotes

Categories

Buy me a coffee

Tag Archives for " iTextSharp "

Dynamically adjust font size of text to fit into a PDF text field using iTextSharp.LGPLv2.Core.

Published January 23, 2021 in .NET core - 0 Comments

In one of the asp.net core projects I worked on, I used iTextSharp.LGPLv2.Core to programmatically fill out a PDF form. Sometimes, we have a string that is too long to fit within the rectangle area of the text field. After a bit of googling, I found and adopted the solution in this StackOverFlow to solve this problem by dynamically compute the appropriate font size I can use so that the value can fit within the field.

Continue reading