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 -----------------------------------------------------------------