How to to extract fonts in FineReader Engine 12


How to check the font of the extracted text in FineReader Engine 12?


Here is a C++ code snippet which can be used to extract fonts:

for(int k = 0; k < paragraphs.getCount(); k++) {
IParagraph paragraph = paragraphs.getElement(k);
IFontStyle baseFont = paragraph.getParagraphStyle().getBaseFont();
System.out.println("Font Name: " + baseFont.getFontName());
System.out.println("Font Type: " + baseFont.getFontType().name());
System.out.println("Font Size: " + baseFont.getFontSize());
System.out.println("Text: " + paragraph.getText());

In order to detect fonts properly, make sure that the related fonts are installed in your system.
If the fonts are already installed/registered in your system, but the fonts are still can't be detected correctly, then you will need to specify the path to the fonts folder using the CustomFontSet::setFolder("path to your fonts folder") property.

Have more questions? Submit a request



  • Avatar

    Tim Mora

    Is the provided code snippet for FlexiCapture or FineReader?

  • Avatar

    Sergey Pilipchuk

    Hi Tim,

    It is for FineReader Engine 12, I have updated the article to better illustrate that.


Please sign in to leave a comment.