ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* pdfstartview
@ 2006-02-01 15:33 Peter Münster
  2006-02-01 16:17 ` pdfstartview Mojca Miklavec
  0 siblings, 1 reply; 20+ messages in thread
From: Peter Münster @ 2006-02-01 15:33 UTC (permalink / raw)


Hello Taco,
in the collector item 80, I was perhaps not clear enough. In fact, I'm just
looking for the ConTeXt-way to do the same as the following in LaTeX:

\documentclass{article}
\usepackage[pdfstartview=FitBH,pdfpagemode=FullScreen]{hyperref}
\begin{document}
\tableofcontents
\newpage
\section{bla}
\end{document}

That is:
- when starting acroread, the view is "minwidth"
- and the mode is "FullScreen"
- and when clicking on a reference, the zoom-level does *not* change

Since this is possible with LaTeX, I believe that it should be also
possible with ConTeXt, for example like this:

\setupoutput[pdf]
\setupinteraction[state=start,startfocus=minwidth]
\setupinteractionscreen[option=max]
\starttext
\completecontent
\page
\section{bla}
\stoptext

Greetings, Peter

-- 
http://pmrb.free.fr/contact/

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: pdfstartview
  2006-02-01 15:33 pdfstartview Peter Münster
@ 2006-02-01 16:17 ` Mojca Miklavec
  2006-02-01 20:45   ` pdfstartview Hans Hagen
  0 siblings, 1 reply; 20+ messages in thread
From: Mojca Miklavec @ 2006-02-01 16:17 UTC (permalink / raw)


On 2/1/06, Peter Münster wrote:
> Hello Taco,
> in the collector item 80, I was perhaps not clear enough. In fact, I'm just
> looking for the ConTeXt-way to do the same as the following in LaTeX:
>
> \documentclass{article}
> \usepackage[pdfstartview=FitBH,pdfpagemode=FullScreen]{hyperref}
> \begin{document}
> \tableofcontents
> \newpage
> \section{bla}
> \end{document}
>
> That is:
> - when starting acroread, the view is "minwidth"
> - and the mode is "FullScreen"
> - and when clicking on a reference, the zoom-level does *not* change
>
> Since this is possible with LaTeX, I believe that it should be also
> possible with ConTeXt, for example like this:
>
> \setupoutput[pdf]
> \setupinteraction[state=start,startfocus=minwidth]
> \setupinteractionscreen[option=max]
> \starttext
> \completecontent
> \page
> \section{bla}
> \stoptext

I vote for this as well (for enchanced possibilities of opening PDF
documents: FitWidth, FitHeight, whole page, XX % of actual size). This
might not be the same as request above, but a very similar one.

I was merely looking for a way to open the document on "100%" (on a
wide/high resolution screen there's usually no need for "FitWidth"
since you only see one third of a page, twice as big as the usual size
for comfortable reading).

I didn't write yet since it's not on the priority list and it doesn't
have any influence on quality, but it's very handy, esp. on Windows
when you have to open the document each time you compile it and
consequently scale it properly again and again.

Scaling on a certain percentage takes some more effort that a usual
"FitWidth", but should be doable.

Thanks,
    Mojca

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: pdfstartview
  2006-02-01 16:17 ` pdfstartview Mojca Miklavec
@ 2006-02-01 20:45   ` Hans Hagen
  2006-02-01 21:10     ` pdfstartview Peter Münster
  2006-02-02  1:16     ` pdfstartview Mojca Miklavec
  0 siblings, 2 replies; 20+ messages in thread
From: Hans Hagen @ 2006-02-01 20:45 UTC (permalink / raw)


Mojca Miklavec wrote:
> On 2/1/06, Peter M�nster wrote:
>   
>> Hello Taco,
>> in the collector item 80, I was perhaps not clear enough. In fact, I'm just
>> looking for the ConTeXt-way to do the same as the following in LaTeX:
>>
>> \documentclass{article}
>> \usepackage[pdfstartview=FitBH,pdfpagemode=FullScreen]{hyperref}
>> \begin{document}
>> \tableofcontents
>> \newpage
>> \section{bla}
>> \end{document}
>>
>> That is:
>> - when starting acroread, the view is "minwidth"
>> - and the mode is "FullScreen"
>> - and when clicking on a reference, the zoom-level does *not* change
>>
>> Since this is possible with LaTeX, I believe that it should be also
>> possible with ConTeXt, for example like this:
>>
>> \setupoutput[pdf]
>> \setupinteraction[state=start,startfocus=minwidth]
>> \setupinteractionscreen[option=max]
>> \starttext
>> \completecontent
>> \page
>> \section{bla}
>> \stoptext
>>     
>
> I vote for this as well (for enchanced possibilities of opening PDF
> documents: FitWidth, FitHeight, whole page, XX % of actual size). This
> might not be the same as request above, but a very similar one.
>   
hey, since when don't you read the source any more ...

\setupinteraction[focus=fit|width|height|minwidth|minheight|standard|<empty>


Hans


-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: pdfstartview
  2006-02-01 20:45   ` pdfstartview Hans Hagen
@ 2006-02-01 21:10     ` Peter Münster
  2006-02-01 22:28       ` pdfstartview Hans Hagen
  2006-02-01 22:32       ` pdfstartview Taco Hoekwater
  2006-02-02  1:16     ` pdfstartview Mojca Miklavec
  1 sibling, 2 replies; 20+ messages in thread
From: Peter Münster @ 2006-02-01 21:10 UTC (permalink / raw)


On Wed, 1 Feb 2006, Hans Hagen wrote:

> >> That is:
> >> - when starting acroread, the view is "minwidth"
> >> - and the mode is "FullScreen"
> >> - and when clicking on a reference, the zoom-level does *not* change

> hey, since when don't you read the source any more ...
> 
> \setupinteraction[focus=fit|width|height|minwidth|minheight|standard|<empty>

Hello Hans,
"focus=..." does *not* set the right zoom-level at startup of acroread
and it *changes* the zoom-level when clicking on a reference.

So, my suggestion for our needs is "startfocus=...".

Cheers, Peter

-- 
http://pmrb.free.fr/contact/

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: pdfstartview
  2006-02-01 21:10     ` pdfstartview Peter Münster
@ 2006-02-01 22:28       ` Hans Hagen
  2006-02-03 18:02         ` pdfstartview Peter Münster
  2006-02-01 22:32       ` pdfstartview Taco Hoekwater
  1 sibling, 1 reply; 20+ messages in thread
From: Hans Hagen @ 2006-02-01 22:28 UTC (permalink / raw)


� wrote:
> On Wed, 1 Feb 2006, Hans Hagen wrote:
>
>   
>>>> That is:
>>>> - when starting acroread, the view is "minwidth"
>>>> - and the mode is "FullScreen"
>>>> - and when clicking on a reference, the zoom-level does *not* change
>>>>         
>
>   
>> hey, since when don't you read the source any more ...
>>
>> \setupinteraction[focus=fit|width|height|minwidth|minheight|standard|<empty>
>>     
>
> Hello Hans,
> "focus=..." does *not* set the right zoom-level at startup of acroread
> and it *changes* the zoom-level when clicking on a reference.
>
> So, my suggestion for our needs is "startfocus=...".
>   
one of the problems is (and this has changed in viewer over time, which is why i never bothered too much about it) is that the opening options are controlled differently from the annotation views

links: 

\setupinteraction[state=start,focus=width] 

opening: 

\setupinteraction[state=start,focus=width,openaction=FitWidth] 

or 

% \setupinteractionscreen[option=max] % bookmark fit doublesided

or (fails): 

% \setupinteraction[state=start,focus=width,openaction=page(1)] 

FitWidth and FullScreen don't go well together (kind of contradict); 

The open action can be chained as can other goto's: 

openaction={page(2),FitWidth}]

it is possible to use FitH trickery with infinity offsets but it's not only ugly but i also consider it subjected to changes in future viewer versions; in the past i've done numerous tests with such features but nowdays i tend to be a bit less eager to implement potentially messy features 

FitWidth is mapped onto a named action which is rather robust

Hans 

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: pdfstartview
  2006-02-01 21:10     ` pdfstartview Peter Münster
  2006-02-01 22:28       ` pdfstartview Hans Hagen
@ 2006-02-01 22:32       ` Taco Hoekwater
  2006-02-02  9:13         ` pdfstartview Hans Hagen
  1 sibling, 1 reply; 20+ messages in thread
From: Taco Hoekwater @ 2006-02-01 22:32 UTC (permalink / raw)


Peter Münster wrote:
> On Wed, 1 Feb 2006, Hans Hagen wrote:
>>>>That is:
>>>>- when starting acroread, the view is "minwidth"
>>>>- and the mode is "FullScreen"
>>>>- and when clicking on a reference, the zoom-level does *not* change
> 
>>hey, since when don't you read the source any more ...
>>
>>\setupinteraction[focus=fit|width|height|minwidth|minheight|standard|<empty>
> 
> Hello Hans,
> "focus=..." does *not* set the right zoom-level at startup of acroread
> and it *changes* the zoom-level when clicking on a reference.

I did some reading up and checked the latex output. It seems
LaTeX does a trick (/OpenAction in the /Catalog jumps to the
first page) to make the views match up. I tried to emulate that,
but could not get it to work (quickly). Will try more tomorrow.

Taco

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: pdfstartview
  2006-02-01 20:45   ` pdfstartview Hans Hagen
  2006-02-01 21:10     ` pdfstartview Peter Münster
@ 2006-02-02  1:16     ` Mojca Miklavec
  2006-02-02  9:01       ` pdfstartview Taco Hoekwater
  2006-02-02  9:16       ` pdfstartview Hans Hagen
  1 sibling, 2 replies; 20+ messages in thread
From: Mojca Miklavec @ 2006-02-02  1:16 UTC (permalink / raw)


On 2/1/06, Hans Hagen wrote:
> Mojca Miklavec wrote:
> > I vote for this as well (for enchanced possibilities of opening PDF
> > documents: FitWidth, FitHeight, whole page, XX % of actual size). This
> > might not be the same as request above, but a very similar one.
> >
> hey, since when don't you read the source any more ...
>
> \setupinteraction[focus=fit|width|height|minwidth|minheight|standard|<empty>

Till yesterday my acrobat was broken for quite some months and I
couldn't experiment much (I hated to reinstall windows).

I looked into ConTeXt source for PDF and into PDF Reference manual a
while ago I don't remember any changes mentioned since that time.

I realized that opening a document on 100% (75%) for example needs
some special handling like /GoTo /D [page /XYZ left top zoom] (I'm
guessing now, I don't have to proper resources available to check it)
which has to be triggered right after the document opens. A bit dirty
in comparison to "fit width", I agree.

I would guess that 99% of the code needed to do that already exists,
it's just that the "zoom to XX %" needs to be triggered at document
opening time. This might have to do something with Taco's remarks. I
might be wrong, so please excuse me in that case.

(I find PDF way too complicated for experimenting in comparison to PS.)

Mojca

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: pdfstartview
  2006-02-02  1:16     ` pdfstartview Mojca Miklavec
@ 2006-02-02  9:01       ` Taco Hoekwater
  2006-02-03 17:56         ` pdfstartview Peter Münster
  2006-02-02  9:16       ` pdfstartview Hans Hagen
  1 sibling, 1 reply; 20+ messages in thread
From: Taco Hoekwater @ 2006-02-02  9:01 UTC (permalink / raw)




Mojca Miklavec wrote:
> I realized that opening a document on 100% (75%) for example needs
> some special handling like /GoTo /D [page /XYZ left top zoom] (I'm
> guessing now, I don't have to proper resources available to check it)
> which has to be triggered right after the document opens. A bit dirty
> in comparison to "fit width", I agree.
> 
> I would guess that 99% of the code needed to do that already exists,
> it's just that the "zoom to XX %" needs to be triggered at document
> opening time. This might have to do something with Taco's remarks. I
> might be wrong, so please excuse me in that case.

This works (but only because object 4 is the first page in my Pdf
document). I do not know if this can be 'internalized'?

   \setupinteraction[state=start,focus=minwidth]
   \doPDFaddtocatalog{/PageMode /FullScreen
                     /OpenAction << /S /GoTo /D [4 0 R  /FitBH ] >> }

Cheers, Taco

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: pdfstartview
  2006-02-01 22:32       ` pdfstartview Taco Hoekwater
@ 2006-02-02  9:13         ` Hans Hagen
  0 siblings, 0 replies; 20+ messages in thread
From: Hans Hagen @ 2006-02-02  9:13 UTC (permalink / raw)


Taco Hoekwater wrote:
> I did some reading up and checked the latex output. It seems
> LaTeX does a trick (/OpenAction in the /Catalog jumps to the
> first page) to make the views match up. I tried to emulate that,
> but could not get it to work (quickly). Will try more tomorrow.
>   
openaction is there for a while, the trick is (at least that is 
something that acrobat does when you change the doc prefs) is do do a 
'goto first page and use a fith with a -32K offset, which to me looks 
like a hack;

(the best way to find solution is to see what acrobat itself does and 
then look into the saved file -)

so, i can imagine latex to do an open action like that

however, in context openactions can be more complex, like:

openaction={page(10),FitWidth,startmovie(whatever)}

so, if one really wants a fith -infty than we need to make a special def 
for that (but we have FitWidth)

Hans

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: pdfstartview
  2006-02-02  1:16     ` pdfstartview Mojca Miklavec
  2006-02-02  9:01       ` pdfstartview Taco Hoekwater
@ 2006-02-02  9:16       ` Hans Hagen
  1 sibling, 0 replies; 20+ messages in thread
From: Hans Hagen @ 2006-02-02  9:16 UTC (permalink / raw)


Mojca Miklavec wrote:
> On 2/1/06, Hans Hagen wrote:
>   
>> Mojca Miklavec wrote:
>>     
>>> I vote for this as well (for enchanced possibilities of opening PDF
>>> documents: FitWidth, FitHeight, whole page, XX % of actual size). This
>>> might not be the same as request above, but a very similar one.
>>>
>>>       
>> hey, since when don't you read the source any more ...
>>
>> \setupinteraction[focus=fit|width|height|minwidth|minheight|standard|<empty>
>>     
>
> Till yesterday my acrobat was broken for quite some months and I
> couldn't experiment much (I hated to reinstall windows).
>
> I looked into ConTeXt source for PDF and into PDF Reference manual a
> while ago I don't remember any changes mentioned since that time.
>
> I realized that opening a document on 100% (75%) for example needs
> some special handling like /GoTo /D [page /XYZ left top zoom] (I'm
> guessing now, I don't have to proper resources available to check it)
> which has to be triggered right after the document opens. A bit dirty
> in comparison to "fit width", I agree.
>
> I would guess that 99% of the code needed to do that already exists,
> it's just that the "zoom to XX %" needs to be triggered at document
> opening time. This might have to do something with Taco's remarks. I
> might be wrong, so please excuse me in that case.
>   
the number of actions that can be done at doc open time using /Key 
/Values is limited (and sometimes contradictionary); that leave the 
openaction, which then may conflict with other open actions (just grep 
for openaction in the base path)
> (I find PDF way too complicated for experimenting in comparison to PS.)
>   
hm, it depends, the more complex pdf features are just taken from 
postscript -)

Hans

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: pdfstartview
  2006-02-02  9:01       ` pdfstartview Taco Hoekwater
@ 2006-02-03 17:56         ` Peter Münster
  2006-02-03 18:29           ` pdfstartview Taco Hoekwater
  0 siblings, 1 reply; 20+ messages in thread
From: Peter Münster @ 2006-02-03 17:56 UTC (permalink / raw)


On Thu, 2 Feb 2006, Taco Hoekwater wrote:

> This works (but only because object 4 is the first page in my Pdf
> document). I do not know if this can be 'internalized'?
> 
>    \setupinteraction[state=start,focus=minwidth]
>    \doPDFaddtocatalog{/PageMode /FullScreen
>                      /OpenAction << /S /GoTo /D [4 0 R  /FitBH ] >> }

Hello Taco,
indeed, this seems to work!
Only 2 problems remain:
- the object number should be found automatically (as you've already written)
- when clicking on a reference, the zoom-level still changes...
Cheers, Peter

-- 
http://pmrb.free.fr/contact/

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: pdfstartview
  2006-02-01 22:28       ` pdfstartview Hans Hagen
@ 2006-02-03 18:02         ` Peter Münster
  2006-02-03 20:20           ` pdfstartview Hans Hagen
  0 siblings, 1 reply; 20+ messages in thread
From: Peter Münster @ 2006-02-03 18:02 UTC (permalink / raw)


On Wed, 1 Feb 2006, Hans Hagen wrote:

> \setupinteraction[state=start,focus=width,openaction=FitWidth] 

Hello Hans,
this works (but not in fullscreen mode).
But "openaction=FitBH" does not work... :(

I don't know, how it's done in LaTeX, but it has always worked during the
last 5 years independently of the version of acroread.

Greetings, Peter

-- 
http://pmrb.free.fr/contact/

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: pdfstartview
  2006-02-03 17:56         ` pdfstartview Peter Münster
@ 2006-02-03 18:29           ` Taco Hoekwater
  2006-02-03 19:43             ` pdfstartview Hans Hagen
                               ` (2 more replies)
  0 siblings, 3 replies; 20+ messages in thread
From: Taco Hoekwater @ 2006-02-03 18:29 UTC (permalink / raw)


Peter Münster wrote:
> On Thu, 2 Feb 2006, Taco Hoekwater wrote:
> 
> 
>>This works (but only because object 4 is the first page in my Pdf
>>document). I do not know if this can be 'internalized'?
>>
>>   \setupinteraction[state=start,focus=minwidth]
>>   \doPDFaddtocatalog{/PageMode /FullScreen
>>                     /OpenAction << /S /GoTo /D [4 0 R  /FitBH ] >> }
> 
> 
> Hello Taco,
> indeed, this seems to work!
> Only 2 problems remain:
> - the object number should be found automatically (as you've already written)
> - when clicking on a reference, the zoom-level still changes...

I assume that is because the /FitBH should match what is implied by
the focus=minwidth, I just freewheeled a bit. The /D(estination) in
this is the top-level page object for page 1, so it actually does an
implied \goto{}[firstpage].

I don't know how to get the object number (I simply reverse-
engineered the hyperref output). It is not all that sneaky an
approach. I don't think it will work on pre 5.0 acroread, though.

Taco

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: pdfstartview
  2006-02-03 18:29           ` pdfstartview Taco Hoekwater
@ 2006-02-03 19:43             ` Hans Hagen
  2006-02-03 19:58             ` pdfstartview Peter Münster
  2006-02-03 20:07             ` pdfstartview Hans Hagen
  2 siblings, 0 replies; 20+ messages in thread
From: Hans Hagen @ 2006-02-03 19:43 UTC (permalink / raw)


Taco Hoekwater wrote:
> I don't know how to get the object number (I simply reverse-
> engineered the hyperref output). It is not all that sneaky an
> approach. I don't think it will work on pre 5.0 acroread, though.
>   
i'll explain the problem / solution in a while 

Hans  

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: pdfstartview
  2006-02-03 18:29           ` pdfstartview Taco Hoekwater
  2006-02-03 19:43             ` pdfstartview Hans Hagen
@ 2006-02-03 19:58             ` Peter Münster
  2006-02-03 20:07             ` pdfstartview Hans Hagen
  2 siblings, 0 replies; 20+ messages in thread
From: Peter Münster @ 2006-02-03 19:58 UTC (permalink / raw)


On Fri, 3 Feb 2006, Taco Hoekwater wrote:

> > Only 2 problems remain:
> > - the object number should be found automatically (as you've already written)
> > - when clicking on a reference, the zoom-level still changes...
> 
> I assume that is because the /FitBH should match what is implied by
> the focus=minwidth,

Hello Taco,
no, if I don't use the focus=minwidth, then clicking a reference brings me
back to the default zoom-level (default means acroread preference).

If you think, that my feature request is of very low priority and not worse
the effort to implement into ConTeXt, then you're probably right.
I've just learned to appreciate this feature during my LaTeX time, and now
I miss it... ;)

Cheers, Peter

-- 
http://pmrb.free.fr/contact/

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: pdfstartview
  2006-02-03 18:29           ` pdfstartview Taco Hoekwater
  2006-02-03 19:43             ` pdfstartview Hans Hagen
  2006-02-03 19:58             ` pdfstartview Peter Münster
@ 2006-02-03 20:07             ` Hans Hagen
  2 siblings, 0 replies; 20+ messages in thread
From: Hans Hagen @ 2006-02-03 20:07 UTC (permalink / raw)


Taco Hoekwater wrote:
> Peter M�nster wrote:
>   
>> On Thu, 2 Feb 2006, Taco Hoekwater wrote:
>>
>>
>>     
>>> This works (but only because object 4 is the first page in my Pdf
>>> document). I do not know if this can be 'internalized'?
>>>       
everything can ... but i've learned my lessons and not everything should 
(unless pdf is stable -)
>>>   \setupinteraction[state=start,focus=minwidth]
>>>   \doPDFaddtocatalog{/PageMode /FullScreen
>>>                     /OpenAction << /S /GoTo /D [4 0 R  /FitBH ] >> }
>>>       
>> Hello Taco,
>> indeed, this seems to work!
>> Only 2 problems remain:
>> - the object number should be found automatically (as you've already written)
>> - when clicking on a reference, the zoom-level still changes...
>>     
>
> I assume that is because the /FitBH should match what is implied by
> the focus=minwidth, I just freewheeled a bit. The /D(estination) in
> this is the top-level page object for page 1, so it actually does an
> implied \goto{}[firstpage].
>
> I don't know how to get the object number (I simply reverse-
> engineered the hyperref output). It is not all that sneaky an
> approach. I don't think it will work on pre 5.0 acroread, though.
>   

over time, the possibilities of pdf has improved as well as changed:

- first there were only page destinations
- then came names ones
- cross doc links were implemented differently
- then there was a behavioural change in optimizers/viewers
- views are not supported in certain named destinations
- etc

this all resulted in context supporting a mixture of destinations (page 
and named) and either or not providing support for views, depending on 
what method was chosen.

the solution that taco suggests is possible now that in pdftex we have 
pdfpageref (ok, a bit of a lie: context could sorty out page object ref 
numbers itself but i never used that here due to mem limitations which 
now are gone)

however, one needs to keep in mind that if we support things like this 
we also assume recent viewers (ok now, but some time ago both linux and 
apple were  behind with viewers)

i'll adapt the pdf driver a bit so that we can do what you want, under 
the assumption that everyone runs the latest pdftex (i normally take a 
one year period before i assume that) as well as that one has a version 
5+ viewer.

\setupinteraction[state=start,focus=width,openaction=firstpage,page=yes] 

\starttext

the page actions (like firstpage) will use the obj ref approach now instead of the auto page destinations, and with page=yes one forces 
all destinations to be page destinations (which is needed on order to
get the view working; keep in mind that one then looses cross document named referencing, only cross doc page referencing remains (no real problem, unless one refers from outside a pdf)  

\stoptext

i'll upload a current with a slightly adapted driver (extra option which is now default; taco: just run a diff on spec-fdf.tex and you'll see what happens) 

\setupinteraction[state=start,focus=width,openaction=page(3),page=yes]

\starttext

test \page
test \page
test \page
test \page
test \page

\stoptext

works ok too 

Hans 
-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: pdfstartview
  2006-02-03 18:02         ` pdfstartview Peter Münster
@ 2006-02-03 20:20           ` Hans Hagen
  2006-02-16 17:55             ` pdfstartview Peter Münster
  0 siblings, 1 reply; 20+ messages in thread
From: Hans Hagen @ 2006-02-03 20:20 UTC (permalink / raw)


� wrote:
> On Wed, 1 Feb 2006, Hans Hagen wrote:
>
>   
>> \setupinteraction[state=start,focus=width,openaction=FitWidth] 
>>     
>
> Hello Hans,
> this works (but not in fullscreen mode).
> But "openaction=FitBH" does not work... :(
>
> I don't know, how it's done in LaTeX, but it has always worked during the
> last 5 years independently of the version of acroread.
>   
hm, i wonder, since it's a bunch of conflicting specs; also, openaction has not been around from the start of pdf (and got more robust later), and access to the page object number in pdftex is pretty recent 

as with many of such features, it has always been possible to cook up something that workes for the latest pdftex and the latest viewer, but if one uses odl and new docs/viewers intermixed there were always penalties. The same is true for more features. Only with acrobat 5 pdf became a bit more stable 

also keep in mind that context has chained annotation support as well as some other features that make it tricky to use certain tricks; in the deiver files you will find some workarounds, like adding quotes around destinations on order to make sure that acrobat 3 does not ignore them - it simply assumed some funny first char sort order in named destination, probably some optimization; or special treatment or spaces or ...

other tricky areas are for instance widgets: context has always built the datastructures needed, and i'm sure not every tex package does that, thereby just depending on the recovery capabilities of acrobat (it indeed reconstructs fields arrays at startup) but context could not depend on that because it supports clones and copies of fields right from the start 

similar weirdness happens (happened) with javascripts: the spec supported a list of scripts, while viewers didn't; and then we don't even talk about initialization ... so, again, it's no problem to get something working for a certain version, but i always want to make sure that we are as backward compatible as possible 

or take special resources (related to plugins) .... keeps changing, never works 100% in the first release of a reader, so i more or less decided that, apart from some playing around, its best to wait till N.0.2 or higher -) 

Hans 

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: pdfstartview
  2006-02-03 20:20           ` pdfstartview Hans Hagen
@ 2006-02-16 17:55             ` Peter Münster
  2006-02-16 21:24               ` pdfstartview Hans Hagen
  0 siblings, 1 reply; 20+ messages in thread
From: Peter Münster @ 2006-02-16 17:55 UTC (permalink / raw)


On Fri, 3 Feb 2006, Hans Hagen wrote:

> > I don't know, how it's done in LaTeX, but it has always worked during the
> > last 5 years independently of the version of acroread.
> >   
> hm, i wonder, since it's a bunch of conflicting specs; also, openaction
> has not been around from the start of pdf (and got more robust later),
> and access to the page object number in pdftex is pretty recent 

Hello Hans,
thanks for all your explanations!
Perhaps LaTeX does not use "openaction". I've made a test with
pdflatex-0.13d and pdflatex-1.30.4 with the following input:

\documentclass{article}
\pdfcompresslevel=0
\usepackage[pdfstartview=FitBH,pdfpagemode=FullScreen]{hyperref}
\begin{document}
\tableofcontents
\newpage
\section{bla}
\end{document}

The two results are in http://pmrb.free.fr/tmp/pdfstartview/
acroread-4.0.5 and acroread-7.0.1 open these files without problems.

The result of a "grep -a FitBH test-0.13d.pdf test-1.30.4.pdf":
test-0.13d.pdf:<< /S /GoTo /D [9 0 R  /FitBH ] >>
test-1.30.4.pdf:<< /S /GoTo /D [10 0 R  /FitBH ] >>

If you could provide a command like
\doittheLaTeXway[pdfstartview=FitBH,pdfpagemode=FullScreen]
that would be really nice!

Greetings, Peter

-- 
http://pmrb.free.fr/contact/

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: pdfstartview
  2006-02-16 17:55             ` pdfstartview Peter Münster
@ 2006-02-16 21:24               ` Hans Hagen
  2006-02-17  6:10                 ` pdfstartview Peter Münster
  0 siblings, 1 reply; 20+ messages in thread
From: Hans Hagen @ 2006-02-16 21:24 UTC (permalink / raw)


� wrote:
>
> The result of a "grep -a FitBH test-0.13d.pdf test-1.30.4.pdf":
> test-0.13d.pdf:<< /S /GoTo /D [9 0 R  /FitBH ] >>
> test-1.30.4.pdf:<< /S /GoTo /D [10 0 R  /FitBH ] >>
>   
btw, this is not related to the pdftex version but to pdf itself; 
openactions were not part of the early pdf specs

you need to backtrack the << >> to its calling point ; what you see is 
just a  reference to a page, but the question is: what does the 
reference (probably the openaction) 
> If you could provide a command like
> \doittheLaTeXway[pdfstartview=FitBH,pdfpagemode=FullScreen]
>   
i think that openaction can do the job (openaction=page(1)  in 
combination with a fitbh  related setup in setupinteraction cum suis)

(btw the latest upload contains the solution posted earlier, i.e. page  
references  that obey  the view keywords , assuming recent viewers etc 
etc) 

Hans

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: pdfstartview
  2006-02-16 21:24               ` pdfstartview Hans Hagen
@ 2006-02-17  6:10                 ` Peter Münster
  0 siblings, 0 replies; 20+ messages in thread
From: Peter Münster @ 2006-02-17  6:10 UTC (permalink / raw)


On Thu, 16 Feb 2006, Hans Hagen wrote:

> (btw the latest upload contains the solution posted earlier, i.e. page  
> references  that obey  the view keywords , assuming recent viewers etc 
> etc) 

Hello Hans,
thank you for the upload! I've made a test with the following input:

\setupinteraction[state=start,focus=minwidth,openaction=firstpage,page=yes] 
\setupinteractionscreen[option=max]
\starttext
\completecontent
\page
\section{bla}
\stoptext

It works quite well. But when changing the zoom-level and then clicking the
reference, the zoomlevel goes back to minwidth. But this is only a minor
issu...

Cheers, Peter

-- 
http://pmrb.free.fr/contact/

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2006-02-17  6:10 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-01 15:33 pdfstartview Peter Münster
2006-02-01 16:17 ` pdfstartview Mojca Miklavec
2006-02-01 20:45   ` pdfstartview Hans Hagen
2006-02-01 21:10     ` pdfstartview Peter Münster
2006-02-01 22:28       ` pdfstartview Hans Hagen
2006-02-03 18:02         ` pdfstartview Peter Münster
2006-02-03 20:20           ` pdfstartview Hans Hagen
2006-02-16 17:55             ` pdfstartview Peter Münster
2006-02-16 21:24               ` pdfstartview Hans Hagen
2006-02-17  6:10                 ` pdfstartview Peter Münster
2006-02-01 22:32       ` pdfstartview Taco Hoekwater
2006-02-02  9:13         ` pdfstartview Hans Hagen
2006-02-02  1:16     ` pdfstartview Mojca Miklavec
2006-02-02  9:01       ` pdfstartview Taco Hoekwater
2006-02-03 17:56         ` pdfstartview Peter Münster
2006-02-03 18:29           ` pdfstartview Taco Hoekwater
2006-02-03 19:43             ` pdfstartview Hans Hagen
2006-02-03 19:58             ` pdfstartview Peter Münster
2006-02-03 20:07             ` pdfstartview Hans Hagen
2006-02-02  9:16       ` pdfstartview Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).