Problems using Link-pdfmarks with Distiller

Problems using Link-pdfmarks with Distiller

Post by Martin Gagno » Sun, 01 Feb 1998 04:00:00



Long posting but with real down to earth code! (that is not working...)

I read the postings of this newsgroups for the last 3 months and I think
my posting will interest a few of the regular contributors. If I missed
a pertinent post, please let me gently know.

I use Acrobat 3.01 for Windows within an introduction to the production
of educative multimedia materials. The course being an introductory
course, my students can live with the limitations of Exchange for the
implementation of multiple links for each PDF page. Not so for me,
because for all my technical course notes I am (appropriately enough)
using Acrobat with 5 standard links on each page. Some of these links
are cross-files links (between section of the course), other are
cross-pages (within the same topic), and others refers to movie or sound
files. The resulting product respond to the requirements within our lab
with a fast Ethernet network.

As can be expected within a "new technology" course, the notes have to
be revised each semester. I want to accelerate the implementation of
these 5 standard links for the following reason. Right now, I use
Exchange to generate "manually" these links and considering more than
150 pages (in 20 files), it calls for a total of 750 links done this
way: enough is enough! I greatly prefer to use my standard ASCII editor
to do this work than to use Exchange and at this point I decided to work
directly on PostScript code and insert the appropriate pdfmarks.

To test the feasability of such an approcah, I did my homework and read
the required reference manuals and downsized my big problem to a more
manageable one. My small objective was to get, after distilling, a PDF
document consisting of two pages each with two tall delineated link: one
on the left side, executing a View-Previous-Page; one on the right side,
executing a View-Next-Page (a total of 4 links)

The following code was added at the beginning of the PostScript code
describing 2 letter-sized pages with a landscape orientation.

     %%No printer execution of pdfmarks
     /pdfmark where
        {pop} {userdict /pdfmark /cleartomark load put} ifelse
     %%End of modification

     %%Manual addition of Pdfmarks for simple auto-links
     [  /Rect [ 15 25 600 225 ]
        /Border [ 0 0 1 ]
        /SrcPg 1
        /Page /Prev
        /Subtype /Link
        /ANN
     pdfmark
     [  /Rect [ 15 575 600 775 ]
        /Border [ 0 0 1 ]
        /SrcPg 1
        /Page /Next
        /Subtype /Link
        /ANN
     pdfmark
     [  /Rect [ 15 25 600 225 ]
        /Border [ 0 0 1 ]
        /SrcPg 2
        /Page /Prev
        /Subtype /Link
        /ANN
     pdfmark
     [  /Rect [ 15 575 600 775 ]
        /Border [ 0 0 1 ]
        /SrcPg 2
        /Page /Next
        /Subtype /Link
        /ANN
     pdfmark
     %%End of manual addition

This code does not work as expected. Distiller works without apparent
problems and produce a PDF file but the resulting PDF file is not
correct concerning the links. As viewed in Exchange, 4 links are
produced but only one is functional (the right link of the first page).
Furthermore, as viewed in Exchange, this link is a "Go to view" link and
not an "Execute Menu Item - View - Next Page" (which will be more
"universal" as a link).

The resulting PDF code is in accord with this analysis but is truly
intriguing:

     1 0 obj
     <<
     /Dest [null /XYZ null null null]
     /Type /Annot
     /Subtype /Link
     /Rect [15 25 600 225]
     /Border [0 0 1]
     >>
     endobj
     4 0 obj
     <<
     /Dest [3 0 R /XYZ null null null]
     /Type /Annot
     /Subtype /Link
     /Rect [15 575 600 775]
     /Border [0 0 1]
     >>
     endobj
     5 0 obj
     <<
     /Dest [null /XYZ null null null]
     /Type /Annot
     /Subtype /Link
     /Rect [15 25 600 225]
     /Border [0 0 1]
     >>
     endobj
     6 0 obj
     <<
     /Dest [3 0 R /XYZ null null null]
     /Type /Annot
     /Subtype /Link
     /Rect [15 575 600 775]
     /Border [0 0 1]
     >>
     endobj

First a "Dest" action is distilled which is curious in itself. Second,
the 2 "left" (previous page) links refers to a null destination: that
explains why it does not work. Third, the 2 "right" (next page) links
refers to object #3 which is page 2 of the file. That may be OK as a
link for page 1 but not for page 2. As a test, I took the original 2
pages and added, within Exchange, the 4 links. The resulting code is
quite convoluted but is correct and functionnal.

A few questions comes to my mind.
- Did I miss something fundamental in the pdfmark reference
  manual (tech note #5150). If so, What?
- If not, is there another, more complete and up to date,
  source of documentation on the use of pdfmarks ?
- Is Distiller wrong in its "compilation" of the pdfmarks
  and is there a solution to my problem (such as using GhostScript) ?

--
Martin Gagnon, professeur
Universit du Qubec Montral
(514) 987-3000, poste 3852

 
 
 

Problems using Link-pdfmarks with Distiller

Post by Ian Kemmi » Mon, 02 Feb 1998 04:00:00



Quote:

>This code does not work as expected. Distiller works without apparent
>problems and produce a PDF file but the resulting PDF file is not
>correct concerning the links. As viewed in Exchange, 4 links are
>produced but only one is functional (the right link of the first page).
>Furthermore, as viewed in Exchange, this link is a "Go to view" link and
>not an "Execute Menu Item - View - Next Page" (which will be more
>"universal" as a link).

A quick check suggests that the annotation objects produced are consistent with
the fact that your pdfmark code is right at the start of the file, and you
refer to the `Prev' (non-exsitent) and `Next' (page 2) pages.

If you want pdfmark code that is remote from the pages to which it refers, you
should probably explore the {PageN} syntax described in the section of the
pdfmark reference manual that talks about COS objects.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Ian Kemmish                   18 Durham Close, Biggleswade, Beds SG18 8HZ, UK

Information on Jaws and 5D's other products availabe at http://www.five-d.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
'The universe may be as great as they say,
but it wouldn't be missed if it didn't exist'  ... Piet Hein

 
 
 

Problems using Link-pdfmarks with Distiller

Post by Nic Plu » Mon, 02 Feb 1998 04:00:00


Long posting but with real down to earth code! (that is not
working...)
<snip>

Inserting named destinations is generally a good thing since if you
later insert or delete pages the you can still use a link ) unlike one
that refers explicitly to a page which may now be incorrect as a
result of the editing.

The only other thing I'd suggest is that there might be an add-in for
your source text creating app that does all this donkey work for you.
I've created one for Word that will not only convert cross references
into hypertext links but will also add "back" buttons for you
(www.nplum.demon.co.uk/temptin/) .

Nic Plum

First a "Dest" action is distilled which is curious in itself. Second,
the 2 "left" (previous page) links refers to a null destination: that
explains why it does not work. Third, the 2 "right" (next page) links
refers to object #3 which is page 2 of the file. That may be OK as a
link for page 1 but not for page 2. As a test, I took the original 2
pages and added, within Exchange, the 4 links. The resulting code is
quite convoluted but is correct and functionnal.

A few questions comes to my mind.
- Did I miss something fundamental in the pdfmark reference
  manual (tech note #5150). If so, What?
- If not, is there another, more complete and up to date,
  source of documentation on the use of pdfmarks ?
- Is Distiller wrong in its "compilation" of the pdfmarks
  and is there a solution to my problem (such as using GhostScript) ?

<snip>

 
 
 

1. mailto link in pdf using Ghostscript/GS View (in Win98) and pdfmark

I know that it is possible to put a URL in a pdf by putting a pdfmark,
e.g.,

[ /Rect [ XLL YLL Xur Yur ]
/Action << /Subtype /URI /URI (http://www.example.com) >>
/Border [ 0 0 2 ]
/Color [ 0 0 1 ]
/Subtype /Link
/ANN
pdfmark

into the postscript. I put it under the %%Begin Prolog and it seems to
work.

What changes are necessary to put a functional mailto link in the pdf?
Is it even possible?

Ideally, I would like to put a mailto link that opens a mail window
with the relevant PDF attached. That way if someone has questions
about a document, the document will be attached to the mail so I know
which one they are asking about.

Has anyone gotten this to work?

Thanks for your attention.

Joe

2. undump utility for dos

3. How can I make links visible using pdfmark?

4. any hints on userID/password software?

5. pdfmark using PStill ... problem!!

6. 20" Aplle Colorsync

7. Distiller rounds pdfmark coordinates?

8. cgi-bin

9. pdfmark -> pdf -> pdfmark, export bookmarks from pdf

10. Problems using Distiller with MicrosoftXP and Office XP

11. Streaks with 'gradients' and custom font problem - Optimising for Reader 3.0 - using Distiller 4.0

12. Problem using Distiller and removing PDFMaker

13. Image problems using Distiller