Searching for text in xps content


#1

What would be the best way to use the Aspose.XPS api to search xps files for text?


#2

@Brian_THOMAS

Thanks for contacting support.

Currently searching text support is not included in the API and we are not sure if we can add this functionality to the API in near future. As text is added in the XPS documents using Gylph and it is complex task to implement search support for Gylph elements. An investigation ticket as XPSNET-16 is already logged in our issue tracking system and we will further work to check the feasibility of the feature.

However, would you please share a bit more about your requirements like, how and why you want to search text in XPS files? Do you want to perform Search and Replace operation over the documents?


#3

I was hoping you’d implement the nice Visitor pattern stuff like you did in the Aspose.Words API.

We might want to search text in order to do redaction - removal and replacement with a black rectangle or family of rectangles.

Or to find a keyword and replace it with a document id number assigned at print time.

Both the glcnd and xpsrchvw Windows apps can do text searching but they’re not at all fast. If you were to implement a fast text search it would be a good reason to write an Apose-based app to view xps content rather than rely on the Windows inbox apps.


#4

@Brian_THOMAS

Thanks for providing more details about the requirements.

We have recorded your comments with the logged ticket and will definitely consider them during investigation. As soon as there are some updates regarding investigation progress, we will share with you. Please spare us little time.

We are sorry for the inconvenience.