Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Possible to search and hold text in defined area of page

Explorer ,
Nov 14, 2016 Nov 14, 2016

I have a script that uses the methods:

this.getPageNthWord and this.getPageNumWords, I have it search the whole page for a zip code and then hold that value, is it possible to define a smaller area than the whole page for the script to search?

TOPICS
Acrobat SDK and JavaScript , Windows
427
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 15, 2016 Nov 15, 2016

It's possible to do it using the getPageNthWordQuads, but it's not a simple

task and it will probably just involve more calculations than what you

already have, as you'll need to look at the coordinates of each word and

compare them to your desired search area, before looking at its contents...

On Tue, Nov 15, 2016 at 7:45 AM, heresha93876846 <forums_noreply@adobe.com>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 15, 2016 Nov 15, 2016

Yes, this can be done by cropping down your page to your target area. The problem is reversing the crop after you are done - it's not as straight forward as one would wish. Take a look here for information about how to do that:

Reverse Crop With Javascript (JavaScript)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 15, 2016 Nov 15, 2016
LATEST

Thank you Karl and try. I will look into your suggestions.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines