logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

New Topic Post Reply
Options
Go to last post Go to first unread
Markus  
#1 Posted : Monday, March 27, 2017 11:31:04 AM(UTC)
Quote
Markus

Rank: Newbie

Groups: Registered
Joined: 3/27/2017(UTC)
Posts: 4
Germany

After clicking on a internal link in a PDF document, i want to jump to the destination of the link (standard functionality), zoom to the destination and mark / highlight (add a rect) the destination object.


As far as I know, I get only the page index of the destination page. Is there a way to get more information about the destination of a link (coordinates, text, obectname,etc.)?

One more question: What Information do i get from a broken link (for excample when the destination page of the link is removed from the document)?
Paul Rayman  
#2 Posted : Tuesday, March 28, 2017 4:32:53 AM(UTC)
Quote
Paul Rayman

Rank: Administration

Groups: Administrators
Joined: 1/5/2016(UTC)
Posts: 1,138

Thanks: 10 times
Was thanked: 133 time(s) in 130 post(s)
You can get more information about destionations from the internal description.
Please examine following array
Code:

var array = Patagames.Pdf.Net.BasicTypes.PdfTypeArray.Create(destination.Handle);


The array will be contains some items. The first of them it is a page dictionary.
Second and third the name of the parameter and its value.
for example:
array[0] - PdfTypeIndirect - the link to the pdf page
array[1] - The PdfTypeName with the value FitH -
array[2] - ThePdfTypeNumberr with the value 1169

You can find more details about that array here
http://www.adobe.com/con...fs/pdf_reference_1-7.pdf

Please see table 8.2 at the page 582
Markus  
#3 Posted : Wednesday, March 29, 2017 1:22:16 AM(UTC)
Quote
Markus

Rank: Newbie

Groups: Registered
Joined: 3/27/2017(UTC)
Posts: 4
Germany

Thank you for your answer and the link, this was very helpful.

I examined the internal link with the following result: (see Attachement)
pdf.png

I was able to asign the records in the Array to the descripten of a pdf link.
So i guess array (0) contains the Destination page. But the Content of property array(0).Number is not a usefule page number.
So my question, how to get the destination page from the array?
Paul Rayman  
#4 Posted : Wednesday, March 29, 2017 3:38:18 AM(UTC)
Quote
Paul Rayman

Rank: Administration

Groups: Administrators
Joined: 1/5/2016(UTC)
Posts: 1,138

Thanks: 10 times
Was thanked: 133 time(s) in 130 post(s)
You can get the page index from instance of PdfDestination class . (PageIndex property)

Code:

var index = destination.PageIndex


I'm not sure about following, but you can try to enumerate all pages in document and compare
page.Dictionary.Handle and
(array[0].Direct as PdfTypeDictionary).Handle

Seems thats should be equals for the same pages.

Edited by user Wednesday, March 29, 2017 3:47:03 AM(UTC)  | Reason: Not specified

Quick Reply Show Quick Reply
Users browsing this topic
Guest
New Topic Post Reply
Forum Jump  
You can post new topics in this forum.
You can reply to topics in this forum.
You can delete your posts in this forum.
You can edit your posts in this forum.
You cannot create polls in this forum.
You can vote in polls in this forum.