Problem with Bookmarks that contain special characters
I have a document with bookmarks that contain phrases with words containing special characters (specifically Italian accents, for example: L’ubiquità della collaborazione)
Then I have buttons at the top of the document. Each button links to a specific bookmark. If the bookmarks contain this characters/accents, the button don't work.
So the buttons only work when linking to bookmarks not contain special characters/accents.
Solved the problem by changing the procedure I used to create bookmarks:
This is what WON'T WORK:
- highlighting all the text and then create a bookmark.
Pro: The bookmarks are added automatically with all the sentence that was highlighted
Cons: The bookmark that contains accents or apostrophes, won't work with buttons
This is the way to SOLVE the problem:
- Instead of highlighting a sentence you want to bookmark,
- you just place the cursor at the beginning of the sentence
- you create the bookmark and because you don't highlight the entire sentence you have to manually put the name of the bookmark
Pro: works even if you have accents or apostrophes
Cons: you have to write the name of the bookmark manually.
-
Oc commented
If you want to use the normal process (select the text and add the bookmark directly), I used the code below to remove the accents after they were all created. (in my case, I only noticed the error of 40 ready files and all had this problem, which did not occur when using the updated acrobat reader, but occurred in some readers and some browsers
for (i=0; i<app.activeDocument.hyperlinkTextDestinations.length; i++){
app.activeDocument.hyperlinkTextDestinations[i].name=app.activeDocument.hyperlinkTextDestinations[i].name.replace ("ç","c")
app.activeDocument.hyperlinkTextDestinations[i].name=app.activeDocument.hyperlinkTextDestinations[i].name.replace ("ó","o")
app.activeDocument.hyperlinkTextDestinations[i].name=app.activeDocument.hyperlinkTextDestinations[i].name.replace ("á","a")
app.activeDocument.hyperlinkTextDestinations[i].name=app.activeDocument.hyperlinkTextDestinations[i].name.replace ("í","i")
app.activeDocument.hyperlinkTextDestinations[i].name=app.activeDocument.hyperlinkTextDestinations[i].name.replace ("õ","o")
app.activeDocument.hyperlinkTextDestinations[i].name=app.activeDocument.hyperlinkTextDestinations[i].name.replace ("ã","a")}
-
Anonymous commented
YES! Thank you!!!