top of page
Hyperlinks to Pages

The script is intended for create hyperlinks to pages of the InDesign document. So when the user clicks on the numbers in the PDF or ePub, displays the required page. Script works with any text. It does not require the index to have been built with InDesign’s indexing feature. Even if the index was created by hand and pasted into the InDesign document, script will still be able to convert all text numbers to hyperlinks.

Implemented:
1) recognition of the Roman and Arabic numbers;
2) applying of a Character style to the found page numbers;
3) creates of hyperlinks of two types:

  • with reference to the page (for exporting to Adobe PDF - interactive version),

  • with reference to the text (for export to ePub 2.0.1 or 3.0 - reflowable);

4) the use of a certain Character style for exclusion the text objects in the processing.

To identify pages range by default is used the symbol "hyphen": VI-XII. In this case, it will create a link to the first number of the range. To create links to both numbers, you need to separate the first number with a space: VI - XII. Change the range symbol can be in the initialization file "Hyperlinks2Pages_ini.txt", which is created when you first start the script (var rangeSeparator = "-";).
To change the rectangle color of the hyperlink you need to edit a variable:
var rectangleColor = 1766089324;

https://documentation.help/InDesign-CS6/pe_UIColors.html

 

The created hyperlinks are not exported to a format ePUB 3 Fixed-Layout.

Сценарий предназначен для создания гиперссылок на страницы InDesign-документа. Таким образом, когда пользователь нажимает на текстовые объекты в форматах PDF или ePub, отображается необходимая страница. Скрипт работает с любыми текстовыми объектами и не требует индексов, которые были получены с помощью средств индексации в InDesign. Даже если индекс был создан вручную и вставлен в InDesign-документ, скрипт может конвертировать все текстовые номера в гиперссылки.

Реализовано:
1) распознавание римских и арабских номеров (цифр);
2) назначение стиля символов (Character Style) для найденных номеров страниц;
3) создание гиперссылок двух типов:

  • с привязкой к страницам (для экспорта в формат Adobe PDF - интерактивная версия),

  • с привязкой к тексту (для экспорта в ePub 2.0.1 или 3.0 - перекомпонуемый макет);

4) использование определённого стиля символов (Character Style) для исключения текстовых объектов при обработке.

Для распознавания диапазона страниц по умолчанию используется символ "дефис": VI-XII. В этом случает будет создаваться ссылка на первый номер диапазона. Для того, чтобы создать ссылки на оба номера диапазона, необходимо отделить первую цифру пробелом: VI - XII. Изменить символ разделителя можно в файле инициализации "Hyperlinks2Pages_ini.txt", который создается при первом старте скрипта (var rangeSeparator = "-";).
Для изменения цвета рамки гиперссылки необходимо изменить переменную:
var rectangleColor = 1766089324;

https://documentation.help/InDesign-CS6/pe_UIColors.html

 

Создаваемые скриптом гиперссылки не экспортируются в формат ePUB 3 Fixed-Layout (фиксированный макет).

bottom of page