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
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
Kindly forward us the JPEG image and PDF file. We will look into it and update you accordingly.
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
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.
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.
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);
}
}
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.
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.
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
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.
We regret to inform that such functionality is not present in the API at the moment. However, could you please share a sample image with us. We will log a feature request in our issue tracking system and share the ID with you.
Thanks Asad.
And one more clarification, If I convert EPS to PDF conversion using Aspose.pdf then I will get pdf with junks only,.
Please advice me to convert eps to pdf conversion.
Would you kindly share your sample EPS file and code snippet which you are using to convert. We will test the scenario in our environment and address it accordingly.
Below is the code and you can take any eps file at your end.
System.IO.FileStream psStream = new FileStream(InputEpsFile, System.IO.FileMode.Open, System.IO.FileAccess.Read);
Aspose.Page.EPS.PsDocument eps = new Aspose.Page.EPS.PsDocument(psStream);
System.IO.Stream pdfStream = System.IO.File.Open(OutputPdfFile, System.IO.FileMode.Create, System.IO.FileAccess.Write);
Aspose.Page.EPS.Device.PdfDevice device = new Aspose.Page.EPS.Device.PdfDevice(pdfStream);
Aspose.Page.EPS.Device.PdfSaveOptions options = new Aspose.Page.EPS.Device.PdfSaveOptions(true);
eps.Save(device, options);
psStream.Close();
pdfStream.Close();
Sorry for the delayed response.
Would you please make sure that you are using a valid license while converting EPS to PDF as we tested with one of our sample files and were unable to notice the issue.
We would like to share with you that there are issues which were already logged regarding EPS to PDF conversion where output PDFs were blank or corrupted. However, they all are logged in reference to some specific EPS file. It would be good if you can please share your sample EPS file so that issue can be investigated accordingly and can be resolved for those type of files as well.