pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Coralie ERAULT <coralie.era...@gmail.com>
Subject PDActionRemoteGoTo with inherit zoom
Date Sun, 22 Jul 2012 18:44:34 GMT

I'm trying to create external bookmarks with inherit zoom in external PDF
with the PDActionRemoteGoTo class.

I wrote this piece of code :

COSArray ca = new COSArray();

ca.add(COSInteger.*get*(0)); //page number

COSDictionary dico =  *new* COSDictionary();

COSArray ca2 = *new* COSArray();



ca2.add(*null*); // zoom factor

dico.setItem("XYZ", ca2);



I'm expecting to have in the PDF file the following line like described  in
the PDF reference

/D [0  /XYZ 0 595 null]

instead i had :

/S /GoToR

/F (Hello_World2.*pdf*)

*/D [0 15 0 R]*



14 0 *obj*
* *


/Type /Font

/*Subtype* /Type1

/BaseFont /*Helvetica*-Bold

/Encoding /WinAnsiEncoding



15 0 *obj*
* *


*/XYZ [0 595 null]*


The problem is that the page is opened with a zoom of 6400%.

I tried also

COSArray ca = new COSArray();

ca.add(COSInteger.*get*(0)); //page number


ca.add(null); //zoom

How can i specify a zoom factor to open the external link with inherit zoom
like described in the PDF reference ?

[*page */XYZ *left top zoom*] Display the page designated by *page*, with
the coordinates (*left*, *top*) positioned at the top-left corner of the
window and the contents of the page magnified by the factor *zoom*. A null
value for any of the parameters *left*, *top*, or zoom specifies that the
current value of that parameter is to be retained unchanged. A *zoom *value
of 0 has the same meaning as a null value. ]




  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message