Hi Jonathan, thanks for taking the time.
OK, I tried your suggestions, and same result.
Can you please tell me why the /Page key is necessary, Acrobat and 2 other
sources I consulted say it is optional, in fact here is the text from the
Acrobat 6 pdfmark reference manual:
"Page integer
(Optional) The sequence number of the destination page. If present,
the named destination pdfmark may be placed anywhere in the
PostScript language file. If omitted, the pdfmark must occur within
the PostScript language description for the destination page."
From what I understand, if I used the page key, I will make my named
detination bound to a page, which is what I am trying to avoid. I think the
Page key is useful if you want to store all the named destination codes in
one place, like at the beginning of the document. Also, like I said, I read
many documents on this, but I do not have your experience.. I hope you will
indulge me... I have not seen the SrcPg key anywhere. It is nowhere to be
found in the pdfmark manual. Where do you get more material on this, like
the [ wp$box pathbbox ] code, is there a list of these things somewhere?
Finally, I though I tried some tests, here are the results:
(All tested with the code I posted in the ealier post)
The files produced with Acrobat 6 work flawlessly under Acrobat 5.
The ones produced with 5 work as they should under 5. The same ones produced
with 5 do not work under 6, I mean everything is fine, except that the links
to named destinations do not work.
Just to make sure that it was not a "Named destination" problem, I tested
with absolute references using page # and the following pdfmark code:
{PRINT \p para "[ /Rect [ wp$box pathbbox ] /Border [ 0 0 1 ] /Action /GoToR
/File (Pub/Fiche test.pdf) /Page 5 /View [ /FitB ] /Subtype /Link /ANN
pdfmark"}
Same result.
Just to be certain, I did another test, I used the following code in Word
with Acrobat 6:
{PRINT \p para "[ /Rect [ wp$box pathbbox ] /Border [ 0 0 1 ] /Page 3
/Subtype /Link /ANN pdfmark"}
But this time it worked.
So, it seems that I can use pdfmark to generate links to other files, links
to other pages in the same file, but not links to specified (absolutre or
relative) location in another file.
What is going on? Is this a problem with the GoToR action or its parameters
at reading time under 6? Because the fle generated by Distiller works under
5. So the problem seems to lie with Acrobat 6 not being able to sort out the
destinations...
Sorry if this post is getting as long as a novel... but I just had a flash.
I tested creating links from within Acrobat to see where the problem m ight
be.
I had the same problem. I creatd a destination in a target document. Came
back to the source, linked it. And bang, no go! I still ended up on the
first page.
After fiddling with it I noticed that sometimes it worked. Finally, I got it
to work. If I create the links in Acrobat itself, I have to specify that the
link to the named destination in another document must be opened in a new
window. Otherwise I end up on the first page, regardless of the named
destination's position in the document.
So the question becomes:
How do I specify "Open destination inNew Window" in the following pdfmark
code:
{PRINT \p para "[ /Rect [ wp$box pathbbox ] /Border [ 0 0 0 ] /Action /GoToR
/Dest /My_Target_1 /File (Pub/Fiche test.pdf) /Subtype /Link /ANN pdfmark"}
TIA
--
_______________________________________
Jean-Guy Marcil
(e-mail address removed)
Jonathan West said:
JGM said:
Hi Jonathan,
Just when I was very proud of having achieved all that I wanted in just less
than a day... something came up!
I talked to my client and learned that he has not yet purchased Acrobat. So
he is going to get Acrobat 6. I tought to myself: "I'd better get it too!"
So I did. Uninstalled 5 and put in 6. Ran my batch macro and it worked
flawlessly, including the skipping of asking the name for each file... Just
as you said it would.
Then I opened my new PDF files in my new Acrobat 6 and was amazed by all the
glitters! But not by the way it behaved! Bad boy!
Here it is:
I have source files that points to a ressource files that contains hundreds
of pages of definitions and descriptions that my client does not want in the
main text (the source files).
So in the ressourcs files, I have included, for example, the following
pdfmark:
{PRINT \p para "[ /Dest /My_Target_1 /View [ /FitB] /DEST pdfmark"}
and in the source file I point to that named destination with:
{PRINT \p para "[ /Rect [ wp$box pathbbox ] /Border [ 0 0 0 ] /Action /GoToR
/Dest /My_Target_1 /File (Pub/Fiche test.pdf) /Subtype /Link /ANN pdfmark"}
Everything worked under Acrobat 5, when I clicked on the source
paragraph,
I
was brought to the 3rd page of the ressource document (Where the named
destinataion given above is located).
Now it takes me to the document allright, but I am always stuck on the first
page. I have several named destination and all the links behave the same
way.
I tried changing all kinds of options in the Acrobat settings, to no avail.
I tried the Distiller options and this Word Compatibility option: “Use
Printer Metrics to Layout Document” . Actually, this last one had to be
checked with Acrobat 5, but with 6, if I uncheck it, it takes one of the
annotation an makes it "hot" on the whole page... so it still needs to be
checked with Acrobat 6.
Any clues as to what I am doing wrong?
Yes. Its quite simple, you have forgotton to include the /Page parameter in
your definition of a named destination. If your example is supposed to take
you to page 3, it should be as follows
{PRINT \p para "[ /Dest /My_Target_1 /Page 3 /View [ /FitB] /DEST pdfmark"}
In fact, I'm mildly surprised it worked even under Acrobat 5, and also
mildly surprised that the links were in the right place even if they were
pointing to the wrong page, because you have also left out the /SrcPg
parameter from the link definitions. I rather think that your link
definition should be as follows (assumes the link is on page 2 of the source
document)
{PRINT \p para "[ /SrcPg 2 /Rect [ wp$box pathbbox ] /Border [ 0 0 0 ]
/Action /GoToR /Dest /My_Target_1 /File (Pub/Fiche test.pdf) /Subtype /Link
/ANN pdfmark"}
--
Regards
Jonathan West - Word MVP
http://www.multilinker.com
Please reply to the newsgroup