コード例 #1
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
        }
コード例 #2
0
        public static void Run()
        {
            // ExStart:CreateJSLink
            // 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.CreateJavaScriptLink("app.alert('Welcome to Aspose!');", rectangle, 1, System.Drawing.Color.Red);

            // Save updated PDF
            contentEditor.Save(dataDir + "CreateJSLink_out_.pdf");
            // ExEnd:CreateJSLink
        }
コード例 #3
0
        public static void Run()
        {
            // ExStart:RemoveAction
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_AsposePdfFacades_LinksActions();

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

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

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

            // Create application link
            contentEditor.RemoveDocumentOpenAction();

            // Save updated PDF
            contentEditor.Save(dataDir + "RemoveOpenAction_out.pdf");
            // ExEnd:RemoveAction
        }
コード例 #4
0
        public static void Run()
        {
            // ExStart:CreateDocAdditionalAction
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_AsposePdfFacades_LinksActions();

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

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

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

            // Create application link
            contentEditor.AddDocumentAdditionalAction(PdfContentEditor.DocumentClose, "app.alert('Thank you for using Aspose products!');");

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