Hi,
I’ve been experimenting with a new use for the layout API - basically I want to be able to collect enough info to work out the text in any given area on a bitmap page image.
I can collect the bounding box and text for each rendered Span entity, but I need to know the font and font size for each span to complete the information I need to collect.
There doesn’t seem to be a direct way to get the Font object (or equivalent) for each span when using the layout API. I have put together some code that sort of works by finding the Paragraph node relating to the span and then going through paragraph.Runs to find the correct run, but there are lots of complex cases to handle like headers/footers etc - I don’t think this approach will be robust.
It would be much easier if you could just add the ability to get the font information from the LayoutEnumerator as well as getting the text for Span entites - is there any possibility of this being added in a future version?
thanks,
Robin
Hi Robin,
Thanks for your inquiry. I have logged a new feature request in our issue tracking system. Your ticket number is WORDSNET-8904. Your thread has also been linked to this issue. Our development team will further look into the details of this problem and we will keep you updated on the status of this issue.
PS: Normally, the font formatting of a text is accessed via Run.Font property and the main reason the layout api doesn’t provide access to Font attributes is that the runs and spans are in many-to-many relationship. Also, please note that not all runs are rendered in layout model and not all spans have corresponding run in the document model.
Best regards,
The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan