You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Christopher G D Tipper <ch...@tiscali.co.uk> on 2002/11/08 20:20:24 UTC

inserting Acrobat actions

Hi,

I've got an interactive document implemented in XSLT/XSL-FO and I need to insert some Acrobat page references. Specifically I have some buttons, where you click to go forward a page, and backward a page, and to close the document (for viewing in full-screen mode, possibly on a PDA).

The problem is I can't figure how to do this. <fo:marker> looked like the way forward but this seems impossible with my understanding of static content.

What I am aiming at is something like:

<fo:basic-link internal-destination="previous-page()">
...
</fo:basic-link>
 
or

<fo:basic-link internal-destination="exit-browser()">
...
</fo:basic-link>

Does anyone know a workaround, as I can't find this in the XSL specification?

Christopher Tipper
--------------------------------o00o--------------------------------
  "Since light travels faster than sound, isn't that why 
   some people appear bright until you hear them speak" 
                                          - Steve Wright
----- Original Message ----- 
From: "Christopher G D Tipper" <ch...@tiscali.co.uk>
To: "FOP user" <fo...@xml.apache.org>
Sent: Friday, November 08, 2002 2:33 PM
Subject: interactive documents


> Hi,
> 
> I've got an interactive document implemented in XSLT/XSL-FO and I need to insert some Acrobat page references. Specifically I have some buttons, where you click to go forward a page, and backward a page, and to close the document (for viewing in full-screen mode, possibly on a PDA).
> 
> The problem is I can't figure how to do this. <fo:marker> looked like the way forward but this seems impossible with my understanding of static content.
> 
> What I am aiming at is something like:
> 
> <fo:basic-link internal-destination="previous-page()">
> ...
> </fo:basic-link>
>  
> or
> 
> <fo:basic-link internal-destination="exit-browser()">
> ...
> </fo:basic-link>
> 
> Does anyone know a workaround, as I can't find this in the XSL specification?
> 
> Christopher Tipper
> 

RE: inserting Acrobat actions

Posted by Victor Mote <vi...@outfitr.com>.
Oleg Tkachenko wrote:

> Christopher G D Tipper wrote:
> >>Why can't you use the ordinary method: put an id on the FO you
> >>want to reference and use it in the link?
> >
> >
> > Because I want to reference exactly the previous page. I have
> no way of knowing this until after the XSLT stage.
> Sounds a little bizarre. What is the use case?

I have never understood the need for this either, since most pdf browsers
have page forward and back buttons on them.

> There is no such a formatting object as page, instead pages are
> generated while formatting objects flow is not exhausted and that makes
> sense, because usually people want to reference some semantic objects
> like table, image or paragraph, but what would be a reason to reference
> just previous page?

Although there is no way to do this at the XSL-FO level, I am pretty sure
that it can be done within the link itself (which is, of course, designated
within XSL-FO). pdfmark has references to FirstPage, PrevPage, NextPage, and
LastPage, so this can definitely be done if you were using Distiller. It
would be a little bit of work to get this mapped to a link in XSL-FO/FOP,
but I am pretty confident that it can be done. I would experiment with the
above key words, perhaps prepending them with an octothorp (#). Look at the
output to see what link is actually generated, and reverse engineer from
there. Also, if you have output from another program that works, compare the
generated link there to the one in the output from FOP for additional
guidance. Whether this succeeds or not, please post back to the list to let
us know. I'd like to either document this (if you are successful), or dig
around a little more (if you are not).

Victor Mote


Re: inserting Acrobat actions

Posted by Oleg Tkachenko <ol...@multiconn.com>.
Christopher G D Tipper wrote:
>>Why can't you use the ordinary method: put an id on the FO you
>>want to reference and use it in the link?
> 
> 
> Because I want to reference exactly the previous page. I have no way of knowing this until after the XSLT stage.
Sounds a little bizarre. What is the use case?
There is no such a formatting object as page, instead pages are 
generated while formatting objects flow is not exhausted and that makes 
sense, because usually people want to reference some semantic objects 
like table, image or paragraph, but what would be a reason to reference 
just previous page?

-- 
Oleg Tkachenko
eXperanto team
Multiconn Technologies, Israel


Re: inserting Acrobat actions

Posted by Christopher G D Tipper <ch...@tiscali.co.uk>.
> Why can't you use the ordinary method: put an id on the FO you
> want to reference and use it in the link?

Because I want to reference exactly the previous page. I have no way of knowing this until after the XSLT stage.

Christopher

Re: inserting Acrobat actions

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Christopher G D Tipper wrote:
> What I am aiming at is something like:
> 
> <fo:basic-link internal-destination="previous-page()">
> ...
> </fo:basic-link>
...
> Does anyone know a workaround, as I can't find this in the XSL specification?

You can't find it because it's not there.
Why can't you use the ordinary method: put an id on the FO you
want to reference and use it in the link?

J.Pietschmann




AW: inserting Acrobat actions

Posted by "J.U. Anderegg" <ha...@bluewin.ch>.
Hi Christopher,
>
> I've got an interactive document implemented in XSLT/XSL-FO and I
> need to insert some Acrobat page references. Specifically I have
> some buttons, where you click to go forward a page, and backward
> a page, and to close the document (for viewing in full-screen
> mode, possibly on a PDA).
>

There aren't any interactive documents in standard XSL:FO and FOP. Button
images as source area of internal links work as internal links - no more and
no less.

I guess you are looking for interactive form fields and their actions. I
modified the PDF renderer 0.20.0 to insert form fields into PDF documents at
a rather low level.

Otherwise have a look at Acrobat Batch Sequences, if your environment allows
to process your documents by an operator. I can ship you a patch to insert
form fields and actions by JavaScript.

Hansuli Anderegg