Quote of the Day

more Quotes

Categories

Buy me a coffee

Tag Archives for " pdf "

Rendering a PDF in angular that works with mobile browsers using ng2-pdf-viewer

Published August 21, 2021 in Angular , ASP.NET core - 0 Comments

In several applications I worked on, we used iframe to display PDFs. The PDF displays fine on desktop browsers. However, on a mobile browser such as Safari on iPhone and iPAD, only the first page shows up. Many people have run into the same issue, as discussed in this stackoverflow post and also on the apple communities page.

Continue reading

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