How to enable "background color" attribute when I export xml

  • 770 Views
  • Last Post 15 February 2016
  • Topic Is Solved
okaizi posted this 25 December 2015

Hi,

I am using c# to recognize pictures and export the result using xml file. I need character color as well as background color in my project, so I tried to set XMLExportParams.WriteCharFormatting to true and XMLExportParams.WriteCharAttributes to XMLCharAttributesEnum.XCA_Extended. However, I can only get font color in this case, and I have tried ohter XMLExportParams but in my exported XMLs, I still cannot get background color attribute. How can I set them in my program to get it (background color of line/word/etc)? Thanks in advance.

Order By: Standard | Newest | Votes
Oksana Serdyuk posted this 31 December 2015

Sorry for the delay in the response. I am consulting with the developers concerning your request and I will return with any news as soon as possible.

Oksana Serdyuk posted this 15 February 2016

I am extremely sorry for a long silence. Unfortunately, the determination of a background color for the XML export format is not supported anymore. The documentation will be updated in the next release of the program.

As to possible workaround, you can extract a background color via API:

  • you can either use the GetTextBackgroundColor method of the ImageDocument object;
  • or after the synthesis stage has been performed, the BackgroundColor properties of the Block and ParagraphParams objects become meaningful. And you can use them to get a background color for a single block or a paragraph correspondingly.

  • Liked by
  • okaizi
okaizi posted this 15 February 2016

Thank you so much for the reply!

Close