You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by "Croe.David" <cr...@inside-online.de> on 2016/09/22 07:59:42 UTC

links and scroll position

Hi,
i would like to create a bookmark which scrolls to a position within the pdf. For that purpose I've tried to use a PDPageXYZDestination, which
comes with a setTop method.
Does anyone know, how setTop works in combination with and without page.Rotation and what exactly should be the behavior ?
I would like to have similar scroll behavior like in web webbrowsers, right now it seems to only scroll to the correct page.
The Acrobat Pdf Reader shows different sroll behaviours if I click on the bookmarks. I guess it depends on the zoom and display resolution, if a complete page
fits into a screen or not?

    final PDPageXYZDestination dest =   new PDPageXYZDestination();
    dest.setTop((int) ?); // is this value befor rotation , after rotation ?
   PDOutlineItem pdOutlineItem = new PDOutlineItem();
   pdOutlineItem.setDestination(dest);

best regards,
 david
____________________________________________________________

[https://www.inside-online.de/mail/footer/anbieter_des_jahres.jpg]<http://www.inside-online.de/de/pressemeldungen-news/anbieter-des-jahres-2016.html?utm_source=Signatur&utm_medium=E-Mail&utm_campaign=Signatur-Anbieter-des-Jahres>
Danke an unsere Kunden für die Wahl zum Anbieter des Jahres 2016!
Kontaktieren Sie uns hier<http://www.inside-online.de/de/kontaktieren.html?utm_source=Signatur&utm_medium=E-Mail&utm_campaign=Signatur-Anbieter-des-Jahres> und erfahren Sie, warum uns unsere Kunden
zum Anbieter des Jahres gewählt haben.
Gerne sprechen wir auch über Ihr E-Learning-Projekt!
____________________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Re: links and scroll position

Posted by Tilman Hausherr <TH...@t-online.de>.
The PDF specification just tells "All coordinate values (left, right, 
top, and bottom) shall be expressed in the default user space coordinate 
system." Why not just try it? It won't bite.

An example on the use of PDPageXYZDestination can be found here, not 
related to bookmarks:
https://stackoverflow.com/questions/39473335/changing-page-zoom-of-an-existing-pdf-with-pdfbox

Tilman

Am 22.09.2016 um 09:59 schrieb Croe.David:
> Hi,
> i would like to create a bookmark which scrolls to a position within the pdf. For that purpose I've tried to use a PDPageXYZDestination, which
> comes with a setTop method.
> Does anyone know, how setTop works in combination with and without page.Rotation and what exactly should be the behavior ?
> I would like to have similar scroll behavior like in web webbrowsers, right now it seems to only scroll to the correct page.
> The Acrobat Pdf Reader shows different sroll behaviours if I click on the bookmarks. I guess it depends on the zoom and display resolution, if a complete page
> fits into a screen or not?
>
>      final PDPageXYZDestination dest =   new PDPageXYZDestination();
>      dest.setTop((int) ?); // is this value befor rotation , after rotation ?
>     PDOutlineItem pdOutlineItem = new PDOutlineItem();
>     pdOutlineItem.setDestination(dest);
>
> best regards,
>   david
> ____________________________________________________________
>
> [https://www.inside-online.de/mail/footer/anbieter_des_jahres.jpg]<http://www.inside-online.de/de/pressemeldungen-news/anbieter-des-jahres-2016.html?utm_source=Signatur&utm_medium=E-Mail&utm_campaign=Signatur-Anbieter-des-Jahres>
> Danke an unsere Kunden f�r die Wahl zum Anbieter des Jahres 2016!
> Kontaktieren Sie uns hier<http://www.inside-online.de/de/kontaktieren.html?utm_source=Signatur&utm_medium=E-Mail&utm_campaign=Signatur-Anbieter-des-Jahres> und erfahren Sie, warum uns unsere Kunden
> zum Anbieter des Jahres gew�hlt haben.
> Gerne sprechen wir auch �ber Ihr E-Learning-Projekt!
> ____________________________________________________________
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org