NewActionGoTo method

Discussions about PDF management.
Post Reply
MarkoZ
Posts: 19
Joined: Tue Jun 29, 2010 9:30 am

NewActionGoTo method

Post by MarkoZ » Fri Sep 11, 2015 7:52 am

Hi,

can you please check if NewActionGoTo method works correctly with all PdfDestinationType values. I was testing it on document with tree pages, I wanted to add a bookmark to start of each page.

With DestinationTypeFit everything worked as expected.

Code: Select all

var actionId = mergedDocument.NewActionGoTo(PdfDestinationType.DestinationTypeFit, currentPage, 0, 0, 0, 0, 0);
However changing destinationType to DestinationTypeXYZ made first bookmark point to beginning of second page, second bookmark to beginning of third page and third bookmark to end of third page.

Code: Select all

var actionId = mergedDocument.NewActionGoTo(PdfDestinationType.DestinationTypeXYZ, currentPage, 0, 0, 0, 0, 0);

delbeke
Posts: 89
Joined: Wed Oct 31, 2012 5:07 pm

Re: NewActionGoTo method

Post by delbeke » Fri Sep 11, 2015 3:48 pm

Hi Markoz
The given coosdinates are set with a left bottom/origin by default. So the action points on the end of the page and the viewer show the next page.
What you can do is to set the origin with something like oGdPicturePDF.SetOrigin(PdfOrigin.PdfOriginTopLeft) before creating the action.

Jean-Luc

MarkoZ
Posts: 19
Joined: Tue Jun 29, 2010 9:30 am

Re: NewActionGoTo method

Post by MarkoZ » Sat Sep 12, 2015 10:26 am

Thanks.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests