Exemple #1
0
        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;
        }
Exemple #2
0
        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);
                    }
                }
            }
        }