EMBED FONT EXAMPLE

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

This ABCpdf example embeds a font into the document.

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)
        {
            // ---- Embeds a font into the document ----
            Doc doc = new Doc();
            doc.FontSize = 216;
            string theFont = "Comic Sans MS";
            doc.Font = doc.EmbedFont(theFont);
            doc.AddText(theFont);
            doc.Save(Server.MapPath("~/Results/Output.pdf"));
            doc.Clear();
        }
    }
}

Embed Font

© 1997-2021    Codehacker - All Rights Reserved