public PDFAction(PDFLink link, IntPtr nativePointer) { if (link == null) { throw new NullReferenceException(); } if (nativePointer == IntPtr.Zero) { throw new NullReferenceException(); } PDFLibrary.AddRef("PDFAction"); m_Source = link; m_Document = link.Page.Document; m_NativePointer = nativePointer; }
public static void ExecuteLinkAction(IPDFDevice device, PDFLink link) { if (device.LinksActionHandler != null) { PDFDest dest = link.GetDest(); if (dest != null) { device.LinksActionHandler.HandleGotoAction(device, dest.PageIndex); } else { PDFAction action = link.GetAction(); if (action != null) { ExecuteAction(device.LinksActionHandler, device, action); } } } }