How to search a text of xps document in xps document viewer through code?
is there any way to search a te开发者_如何学编程xt through code and bring the focus. This is to bring focus on heading in a xpsDocument.
Thanks,
The good news is XPS is XML at its core so its easier to reverse engineer than a binary format, say PDF. The bad news is that XPS, much like PDF, stores small bits of text arranged by their coordinates and potentially a series of matrix transformations.
Matrix transformations can occur on any container element as well as the text. So in plain English, there is no direct way to determine the reading order of the text it contains.
To the best of my knowledge there isn't yet an XPS library that does this hard work for you.
FYI, The company I work for is currently trying to decide on XPS vs PDF as an output format for documents that will need to have phrases found for subsequent processing. We are currently leaning heavily toward PDF as our format due, in part, to the lack of processing libraries for XPS but abundance of them for PDF...
精彩评论