public static void Run()
        {
            // ExStart:CreateAppLinkWithColor
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_AsposePdfFacades_LinksActions();

            // Open document
            PdfContentEditor contentEditor = new PdfContentEditor();
            contentEditor.BindPdf(dataDir + "CreateApplicationLink.pdf");

            System.Drawing.Rectangle rectangle = new System.Drawing.Rectangle(100, 100, 200, 200);

            // Create application link
            contentEditor.CreateApplicationLink(rectangle,  dataDir + "test.txt", 1, System.Drawing.Color.Red);

            // Save updated PDF
            contentEditor.Save( dataDir + "CreateAppLinkWithColor_out.pdf");
            // ExEnd:CreateAppLinkWithColor                                 
        }
Exemplo n.º 2
0
        public static void Run()
        {
            // ExStart:CreateAppLink
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_AsposePdfFacades_LinksActions();

            // Open document
            PdfContentEditor contentEditor = new PdfContentEditor();

            contentEditor.BindPdf(dataDir + "CreateApplicationLink.pdf");

            System.Drawing.Rectangle rectangle = new System.Drawing.Rectangle(100, 100, 200, 200);

            // Create application link
            contentEditor.CreateApplicationLink(rectangle, dataDir + "test.txt", 1);

            // Save updated PDF
            contentEditor.Save(dataDir + "CreateApplicationLink_out_.pdf");
            // ExEnd:CreateAppLink
        }