Skip to main content
Participant
September 24, 2023
Question

Lesezeichen mit JavaScript erstellen

  • September 24, 2023
  • 1 reply
  • 355 views

Hallo liebe Community,

 

ich möchte mit JavaScript in einem PDF-Dokument (Adobe Acrobat Pro) Lesezeichen erstellen. Die Benennung des Lesezeichens sollte das Wort sein, welches auf der jeweiligen Seite in der Fußzeile (siehe screenshot) zu finden ist. Da manche Seiten in einem PDF-Dokument in der Fußzeile das selbe Wort enthalten - sollten Duplikate vermieden werden.

 

Ich bin mit JavaScript nicht vertraut und die vielen Stunden mit ChatGPT waren leider nicht von Erfolg gekrönt.

 

Wäre Euch für jede Hilfestellung sehr dankbar😊

 

 

 

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
September 24, 2023

This is possible using a custom-made script, yes, but it's not a trivial task. The trickiest part is identifying the text based on its location on the page, as it requires going over the text in the document word by word, comparing their coordinates (in the form of a quads array) to the area we're interested in.

Also, you didn't say what should happen if a duplicate text is found. It is possible to create duplicate bookmarks with the same name, but it might be confusing for the user. Another option is to add a suffix to them ("Text (1)", "Text (2)", etc.), so that they are unique.

 

If you're interested in hiring a professional to create this script for you, feel free to contact me privately by clicking my user-name and then on "Send a Message".