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

how to move pages within a pdf document using javascript based on the contents properties of an annotation.content property object

Guest
Sep 07, 2016 Sep 07, 2016

Hi,

I have a pdf  document that has text annotation on every page within the pdf document

and I want to sort them out based on the getannotat.content property with javascript code

for example I want to sort them out based on an identical text content of annotation  make the pages after each other

how do I perform such thing with javascript ?

Best Regards .

TOPICS
Acrobat SDK and JavaScript , Windows
563
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 ,
Sep 07, 2016 Sep 07, 2016
LATEST

This is quite a complex task. First of all you will need to collect the annotations into an array and then write your own sorting function that will sort it. Then you will need to write a recursive function that sorts the pages based on the new order of the array.

Alternatively you could export the pages and then re-combine them in the desired order. I prefer to do that then try to re-sort the file directly, but it's not that simple, either.

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