You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Bharat Bhatt <bh...@gmail.com> on 2017/07/05 06:25:17 UTC

Hyperlink within PDF

Hi,

I want to link diferent sections in the PDF. In PDF, on page 1 section 1 is
created and Page2 section 2 is created.
So when I click on Section1 text, focus will be move to Section 2 of Page2 .
And when I click on Section 2 of Page2 cursur/focus will move to Section 1
of Page 1.

What api of PDFBox I should use it or any example I can refer to acheive
this funxtonality.


Thanks,
Bharat

Re: Hyperlink within PDF

Posted by Bharat Bhatt <bh...@gmail.com>.
Hi Tilman,

Thanks a lot for your inputs. I tried PDPageXYZDestination and its working
 fine.

Thanks,
Bharat

On Wed, Jul 5, 2017 at 10:16 PM, Tilman Hausherr <TH...@t-online.de>
wrote:

> Hi,
>
> It's not attached, because these don't get through... there are different
> PDPageDestination types. The example uses PDPageFitWidthDestination. You
> could use PDPageXYZDestination instead, and call setZoom() on the
> PDPageXYZDestination object.
>
> Tilman
>
>
> Am 05.07.2017 um 09:01 schrieb Bharat Bhatt:
>
>> Hi,
>>
>> I tried that example but issue is when I click on link destination page
>> is opened 546% zoom. I tried with setNoZoom(...) also but still issue is
>> there.
>> Java class and PDF  is attached.
>> Please let me know how to fix this issue.
>>
>> Thanks,
>> Bharat
>>
>> On Wed, Jul 5, 2017 at 11:57 AM, Tilman Hausherr <THausherr@t-online.de
>> <ma...@t-online.de>> wrote:
>>
>>     Am 05.07.2017 um 08:25 schrieb Bharat Bhatt:
>>
>>         Hi,
>>
>>         I want to link diferent sections in the PDF. In PDF, on page 1
>>         section 1 is
>>         created and Page2 section 2 is created.
>>         So when I click on Section1 text, focus will be move to
>>         Section 2 of Page2 .
>>         And when I click on Section 2 of Page2 cursur/focus will move
>>         to Section 1
>>         of Page 1.
>>
>>         What api of PDFBox I should use it or any example I can refer
>>         to acheive
>>         this funxtonality.
>>
>>
>>     Have a look at the AddAnnotations.java example in the source code
>>     download.
>>
>>     Tilman
>>
>>     ---------------------------------------------------------------------
>>     To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>>     <ma...@pdfbox.apache.org>
>>     For additional commands, e-mail: users-help@pdfbox.apache.org
>>     <ma...@pdfbox.apache.org>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>> For additional commands, e-mail: users-help@pdfbox.apache.org
>>
>
>
>

Re: Hyperlink within PDF

Posted by Tilman Hausherr <TH...@t-online.de>.
Hi,

It's not attached, because these don't get through... there are 
different PDPageDestination types. The example uses 
PDPageFitWidthDestination. You could use PDPageXYZDestination instead, 
and call setZoom() on the PDPageXYZDestination object.

Tilman


Am 05.07.2017 um 09:01 schrieb Bharat Bhatt:
> Hi,
>
> I tried that example but issue is when I click on link destination 
> page is opened 546% zoom. I tried with setNoZoom(...) also but still 
> issue is there.
> Java class and PDF  is attached.
> Please let me know how to fix this issue.
>
> Thanks,
> Bharat
>
> On Wed, Jul 5, 2017 at 11:57 AM, Tilman Hausherr 
> <THausherr@t-online.de <ma...@t-online.de>> wrote:
>
>     Am 05.07.2017 um 08:25 schrieb Bharat Bhatt:
>
>         Hi,
>
>         I want to link diferent sections in the PDF. In PDF, on page 1
>         section 1 is
>         created and Page2 section 2 is created.
>         So when I click on Section1 text, focus will be move to
>         Section 2 of Page2 .
>         And when I click on Section 2 of Page2 cursur/focus will move
>         to Section 1
>         of Page 1.
>
>         What api of PDFBox I should use it or any example I can refer
>         to acheive
>         this funxtonality.
>
>
>     Have a look at the AddAnnotations.java example in the source code
>     download.
>
>     Tilman
>
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>     <ma...@pdfbox.apache.org>
>     For additional commands, e-mail: users-help@pdfbox.apache.org
>     <ma...@pdfbox.apache.org>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org



Re: Hyperlink within PDF

Posted by Bharat Bhatt <bh...@gmail.com>.
Hi,

I tried that example but issue is when I click on link destination page is
opened 546% zoom. I tried with setNoZoom(...) also but still issue is there.
Java class and PDF  is attached.
Please let me know how to fix this issue.

Thanks,
Bharat

On Wed, Jul 5, 2017 at 11:57 AM, Tilman Hausherr <TH...@t-online.de>
wrote:

> Am 05.07.2017 um 08:25 schrieb Bharat Bhatt:
>
>> Hi,
>>
>> I want to link diferent sections in the PDF. In PDF, on page 1 section 1
>> is
>> created and Page2 section 2 is created.
>> So when I click on Section1 text, focus will be move to Section 2 of
>> Page2 .
>> And when I click on Section 2 of Page2 cursur/focus will move to Section 1
>> of Page 1.
>>
>> What api of PDFBox I should use it or any example I can refer to acheive
>> this funxtonality.
>>
>>
> Have a look at the AddAnnotations.java example in the source code download.
>
> Tilman
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>
>

Re: Hyperlink within PDF

Posted by Tilman Hausherr <TH...@t-online.de>.
Am 05.07.2017 um 08:25 schrieb Bharat Bhatt:
> Hi,
>
> I want to link diferent sections in the PDF. In PDF, on page 1 section 1 is
> created and Page2 section 2 is created.
> So when I click on Section1 text, focus will be move to Section 2 of Page2 .
> And when I click on Section 2 of Page2 cursur/focus will move to Section 1
> of Page 1.
>
> What api of PDFBox I should use it or any example I can refer to acheive
> this funxtonality.
>

Have a look at the AddAnnotations.java example in the source code download.

Tilman

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