Error extracting FontStyle from glyphs

Hi: 

When extracting text from a PDF file using `string extractedText = page.ExtractText(out lines);`, I can't correctly obtain the font styles. I always get "Regular". I've tried extracting them from the font itself, but without success. I've attached the project and the PDF file.

Best Regards,

Jesús


Attachment: glyphFontStyle_242782bb.rar

2 Replies

IJ Irfana Jaffer Sadhik Syncfusion Team December 12, 2025 09:51 AM UTC

Hi Jesus,


Currently we are analyzing on the reported behavior with the provided details on our end and we will share the further details on December 16th, 2025.


Regards,

Irfana J.



IJ Irfana Jaffer Sadhik Syncfusion Team December 16, 2025 12:22 PM UTC

Hi Jesus,


We extracted the font style information from the font dictionary, specifically from the base font name details. However, font styles in PDF documents can be applied in different ways. For example, to achieve a bold style for a font that does not have a native bold variant, the bold effect is often applied using the text rendering mode defined in the page content graphics. Similarly, italic style can be simulated by skewing the text, and underline style is typically applied at the content graphics level. Due to these variations, we are unable to reliably extract font style information in certain scenarios based solely on the font dictionary.


Regards,

Irfana J.




Loader.
Up arrow icon