How to get font details from the attached image


#1

Hi Team,

My requirement is to get font details from the attached jpeg image and PDF using java.
please kindly help me to get those details.

Thanks & regards,
priyanga G


#2

@priyanga,

Kindly forward us the JPEG image and PDF file. We will look into it and update you accordingly.


#3

Hi @ikram.haq,

Thanks for your feedback .Here I have attached the samples.

sample1:sample1.zip (57.0 KB)

sample2: sample2.zip (549.9 KB)

Thanks & regards,
Priyanga G


#4

@priyanga,

This is to update you that support to detect font is not present in Aspose.OCR. There is no plan for the support of this feature. We are sorry for the inconvenience caused.


#5

Hi @ikram.haq,

I have tried get text option for text color,bold,italic. I am not able to get font size and font name.

Please kindly help me to get the the font size and name.

Thanks & regards,
Priyanga G.


#6

@priyanga,

As updated in my last post that the feature you are looking for is not available. There is no plan for the support of this feature. We are sorry for the inconvenience caused. However, you can detect if the text is italic or not. Following is the sample code for your reference.

CODE:

OcrEngine ocrEngine = new OcrEngine();
ocrEngine.Image = ImageStream.FromFile("imageFile");

        if (ocrEngine.Process())
        {
            Console.WriteLine(ocrEngine.Text);

            IRecognizedPartInfo[] text = ocrEngine.Text.PartsInfo;

            foreach (IRecognizedTextPartInfo symbol in text)
            {
                Console.WriteLine("Text : " + symbol.Text);
                Console.WriteLine("isItalic : " + symbol.Italic);
                Console.WriteLine("Language : " + symbol.Language);
            }
        }

#7

Hi @ikram.haq,

Thanks for your feedback.
From the aspose.ocr java documentation mentioned the getPartsInfo() method returns the following information.please ,kindly help me to get the font size,font name from the attached sample.

sample1: sample2.zip (549.9 KB)

getPartsInfo

Returns:
Each part has its own style, font, text size, color, language and more. If the text consists of several parts that are written by different font (or a different language, etc.), then according to each will have an element in this array. It is divided by the words into parts, if have large text that has the same style. Parts are consistently followed, that they found in the original text so they are following here.


#8

@priyanga,

Yes, it is correct that each part has its own style, font, text size, color, language. But the feature of detecting font size,font name is not supported. In the code example of documentation you can see that we can only have information about is text italic or not. Furthermore, you can access the IRecognizedTextPartInfo interface details and explore.


#9

Hi @ikram.haq,

please ,kindly help me to solve this issue.Once the detecting font size,font name feature has been included. please,kindly update the status.

We are awaiting for your quick solution.

Thanks & regards,
priyanga G


#10

@priyanga,

We surly will update you once the feature will be available. Further to update you that we are currently working on Aspose.OCR for Cloud. Development on Aspose.OCR for .NET is temporarily suspended.

We are sorry for the inconvenience.