REMAP PAGES EXAMPLE

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

This ABCpdf example remaps pages for reordering, copying, and deletion.

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)
        {
            // Remaps pages for reordering, copying and deletion
            Doc doc = new Doc();
            doc.Read(Server.MapPath("~/Results/AddBookMark.pdf"));
            doc.FontSize = 500;
            doc.Color.String = "255 0 0";
            doc.HPos = 0.5;
            doc.VPos = 0.3;
            int theCount = doc.PageCount;
            string thePages = "";
            for (int i = 1; i <= theCount; i++)
            {
                doc.PageNumber = i;
                doc.AddText(i.ToString());
                thePages = thePages + (theCount - i + 1).ToString() + 
            " ";
            }
            doc.RemapPages(thePages);
            doc.Save(Server.MapPath("~/Results/Output.pdf"));
            doc.Clear();
        }
    }
}

Remap Page

© 1997-2021    Codehacker - All Rights Reserved