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

Notification

Icon
Error

Options
Go to last post Go to first unread
Diehl And Associates LLC  
#1 Posted : Wednesday, September 18, 2024 3:59:41 PM(UTC)
Diehl And Associates LLC

Rank: Newbie

Groups: Registered
Joined: 7/12/2024(UTC)
Posts: 4
United States

So I have a PDF with 190 pages, and have successfully placed 285 Named Destinations using

theDest = PdfDestination.CreateFitR(theDocument, tIdx, tL, tB, tR, tT)
theDocument.NamedDestinations.Add(theDest, theSheetNumber & "/" & theDetail)

These have been verified using BlueBeam REVU.

I now need to add 640 links, using (I think)

annot.Link.Action = New PdfGoToRAction(theDocument, fileSpec, dest)

The trick that I need to know (I think), is how to get the Name of the previously built Named Destination into dest.

I know how to do an annot.Link.Action = New PdfGoToRAction(theDocument, fileSpec, dest), that’s not what I’m looking for.

Presumably it is in the documentation, but I’ve spent a week and I can’t find it, so I’m not so sure it is.


Right now I've got:

theDocument2 = PdfDocument.Load(theInputPath & theSection & "\" & theNumberAndTitlePLACE & ".PDF")
Dim fileSpec As New PdfFileSpecification(theDocument2)
fileSpec.FileName = theNumberAndTitlePLACE & ".PDF"
theDest = PdfDestination.CreateFitR(theDocument2, 0, theBoxLeft, theBoxTop, theBoxRight, theBoxBottom)
AnnotX.Link.Action = New PdfGoToRAction(theDocument, fileSpec, theDest)
Page.Annots.Add(AnnotX)
theDocument2.Dispose()

Which is close, but it doesn't do an 'R' zoom.
Paul Rayman  
#2 Posted : Wednesday, September 18, 2024 8:16:12 PM(UTC)
Paul Rayman

Rank: Administration

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

Thanks: 7 times
Was thanked: 128 time(s) in 125 post(s)
Hello,

You need to use the PdfDestination(doc, name) constructor.
The documentation says
doc - Document which contains this destination. Null for remote destination.
name - The name of destination in remote document. If specified, all other parameters of the destination are ignored.

Code:

var theDest = new PdfDestination(null, "theNameOfRemoteDestination");
AnnotX.Link.Action = New PdfGoToRAction(theDocument, fileSpec, theDest);

Edited by user Wednesday, September 18, 2024 8:30:41 PM(UTC)  | Reason: Not specified

Diehl And Associates LLC  
#3 Posted : Friday, September 20, 2024 11:37:30 AM(UTC)
Diehl And Associates LLC

Rank: Newbie

Groups: Registered
Joined: 7/12/2024(UTC)
Posts: 4
United States

Thank-you very much!!! BTW, 'null' is now 'nothing in MS VB- whatever, right? This works great. I am also very happy at the speed of execution.
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.