Product: WebViewer
Product Version: 10.7.2
I am trying to use the searchTextFull results to find text that starts with “_X” then create an annotation for a signature field, i did it and worked but, i am getting a field (search result) found on a page that does not even have text on that part is pretty much blank, tried the same pdf on https://showcase.apryse.com/pdf-search but there the ghost search result is not found
i am using this code
UI.searchTextFull("_X*",
caseSensitive: true,
wholeWord: true,
wildcard: true,
regex: false,
searchUp: false,
ambientString: false,
});
then on the search listener (removed code for simplicity) i get the fields and create new annotations using the quads
const newAnnotations = results
?.map((result: any, index: any) => {
const quad = result.quads.map((quad: { getPoints: () => any; }) => quad.getPoints())[0];
const signatureHeight = (quad.y2 - quad.y3) * 2;
const inputAnnot = new Annotations.SignatureWidgetAnnotation(field, {});
inputAnnot.Width = quad.x2 - quad.x1 - horizontalShift;
inputAnnot.Height = signatureHeight;
inputAnnot.X = quad.x1 + horizontalShift;
inputAnnot.Id = fieldId;
inputAnnot.PageNumber = result.pageNum;
inputAnnot.Y = quad.y1 - signatureHeight;
return inputAnnot;
});
this works just fine, the only issue is that its finding something on page 7 that it exists on that place but on page 8, cant find why is that happening
is there a better way of doing this process?