Article View: adobe.scripting.indesign
Article #20578Re: Automating the production of Next Page/Previous Page Hyperlinks
From: Olav Kvern
Date: Wed, 26 Jun 2002 21:19
Date: Wed, 26 Jun 2002 21:19
79 lines
3086 bytes
3086 bytes
Gang--
Here's the "thinking outside the box" solution: The Acrobat Distiller implements "pdfmark," a special set of PostScript operators for adding hyperlinks to PDFs. If you embed pdfmark command in an EPS, and then run the EPS through the Distiller, you can get page navigation, URL links, email links, and so on in your PDF.
It follows, therefore, that you can place these EPSs in InDesign, then print PostScript to disk, and then run the resulting PostScript through the Distiller to create a PDF with "fancy" pdfmark features.
Here's an EPS that adds a "next page" hyperlink:
%!PS-Adobe-2.0 EPSF-1.2
%%BoundingBox: 0 0 36 36
%%Creator:(O. M. Kvern)
%%Title:(pdfmark_next_page.eps)
%%CreationDate:(June 26, 2002)
%%EndComments
.25 setlinewidth
newpath
0 0 moveto
36 18 lineto
0 36 lineto
closepath
%----------
%pdfmark next page
systemdict /pdfmark known {
pathbbox
/ury exch def
/urx exch def
/lly exch def
/llx exch def
[/Rect [llx lly urx ury ]
/Border [0 0 0]
/Page /Next
/View [/XYZ null null null]
/LNK pdfmark
} if
%----------
stroke
%%End of file
Copy the above text out of the message, paste it into a text editor, and save it with the file extension .EPS.
Here's the "previous page" version:
%!PS-Adobe-2.0 EPSF-1.2
%%BoundingBox: 0 0 36 36
%%Creator:(O. M. Kvern)
%%Title:(pdfmark_previous_page.eps)
%%CreationDate:(June 26, 2002)
%%EndComments
.25 setlinewidth
newpath
0 18 moveto
36 0 lineto
36 36 lineto
closepath
%----------
%pdfmark previous page
systemdict /pdfmark known {
pathbbox
/ury exch def
/urx exch def
/lly exch def
/llx exch def
[/Rect [llx lly urx ury ]
/Border [0 0 0]
/Page /Prev
/View [/XYZ null null null]
/LNK pdfmark
} if
%----------
stroke
%%End of file
Do the same copy/paste/save as EPS operation with this text. Now you have two pdfmark-enhanced EPS graphics. Place them on the document pages and/or (even better) master pages of an InDesign document. When you want to create a PDF from the document, don't use PDF export--instead, print PostScript to disk and generate the PDF using the Distiller. When you do this, Distiller will read the pdfmark commands and turn them into nifty next page/previous page links in the resulting PDF.
Thanks,
Ole
Technical Details
Message-ID:
<ef9252e.9@WebX.aaQKaf7vad4>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!supernews.com!news.maxwell.syr.edu!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<ef9252e.-1@WebX.aaQKaf7vad4>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,385d1db3f7850ac X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2002-06-26 14:38:10 PST From: "Olav Kvern" <okvern@adobe.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!supernews.com!news.maxwell.syr.edu!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Re: Automating the production of Next Page/Previous Page Hyperlinks Message-ID: <ef9252e.9@WebX.aaQKaf7vad4> Date: Wed, 26 Jun 2002 14:19:35 -0700 References: <ef9252e.-1@WebX.aaQKaf7vad4> Lines: 92 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit