Q: I want to zoom to a specific word (extracted by TextExtractor) on a specific page but i don’t know how to do it.
PDFViewCtrl.SetZoom(x,y,zoom) method did not work and I don’t know how to get the right x,y parameters for SetZoom method.
A: PDFViewCtrl.ShowRect(int page_num, Rect rect) changes the viewing area to fit a rectangle on a given page.
The rectangle must be specified in page coordinates. This function will adjust current page and zoom appropriately.
You can obtain bounding box for a given word extracted using pdftron.PDF.TextExtractor using word.GetBBox()