SET OBJECT INFO EXAMPLE

The following .NET application has been developed using ABCpdf, ASP.NET, and the C# language.

This ABCpdf example sets information about an object.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Drawing;
using System.Text;
using System.Net;
using System.IO;
using WebSupergoo.ABCpdf8;

namespace ABCpdfExamples
{
    public partial class test : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            // ---- Sets information about an object ----
            Doc doc = new Doc();
            doc.Read(Server.MapPath("~/Results/AddHtml.pdf"));
            int intPages = doc.GetInfoInt(doc.Root, "Pages");
            int thePage2 = doc.GetInfoInt(intPages, "Page 2");
            string theAction = "[ " + thePage2.ToString() + 
            " 0 R /Fit ]";
            doc.SetInfo(doc.Root, "/OpenAction", theAction);
            doc.Save(Server.MapPath("~/Results/Output.pdf"));
            doc.Clear();
        }
    }
}


© 1997-2018 codehacker.com - All Rights Reserved            RapidSSL