We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Font on Field Not Updating

Hello!

I’m trying to use a TrueType font on a field in a PDF. The font is embedded in the document and I can use the font for text, but the field seems to be ignoring the font.

Apose version is 17.6.0

// Here I create my font object
Font steveFont = Aspose.Pdf.Text.FontRepository.OpenFont(@"C:\Work\TF_DEV\WOW.EAPP.Common\1_DEVL\WebServices\EAppServices\STEVE.TTF");
steveFont.IsEmbedded = true;

// Here I create my appearance object
var steveAppearance = new DefaultAppearance(steveFont, fontSize, System.Drawing.Color.DarkBlue);
steveAppearance.FontName = "SteveHandwriting";


// Later, I call this method to build the TextBoxField and pass steveAppearance to this method.
private TextBoxField CreatePiSigTextBox(Document pdfDocument, DefaultAppearance appearance)
{
    if (log.IsDebugEnabled) log.DebugFormat(CultureInfo.InstalledUICulture, $"CreatePiSigTextBox called");
    TextBoxField piSigTextBox = new TextBoxField(pdfDocument.Pages[page], GenerateSigRectangle(signatureCoordinates.piSigXpos, signatureCoordinates.piSigYpos));
    piSigTextBox.HorizontalAlignment = HorizontalAlignment.Left;
    piSigTextBox.PartialName = "SIG_X_APPCNT";
    piSigTextBox.DefaultAppearance = appearance;

    return piSigTextBox;
}

We tried some other fonts, too, but we can’t see to get the field to change. Any suggestions?

Sig fields start on page 3.

download.pdf (86.0 KB)

STEVE.zip (37.1 KB)

Thanks!

Hi,

Thank you for contacting support. Kindly send us your font file and expected output PDF document. We will investigate and share our findings with you.

Thanks & Regards,
Imran Rafique

I’ve added the font file to the original post. Thanks!

Hi,

Thank you for the details. Please share complete code of the use case. The GenerateSigRectangle method is not defined. Your response is awaited.

I can show you my code, but I was hoping you’d show me the correct way to do it. I can fix my code if I have a working example.

using Aspose.Pdf;
using EApp.Services.Properties;
using log4net;
using System;
using System.Globalization;
using System.IO;
using Polly;
using System.Collections;
using Aspose.Pdf.Text;
using Aspose.Pdf.Annotations;
using Aspose.Pdf.Forms;
using EApp.Services.Model;

namespace EApp.Services.Code
{
    internal class IllustrationSignatureBoxUtility
    {
        private static readonly ILog log = LogManager.GetLogger(typeof(IllustrationSignatureBoxUtility));
        private static int topOfPage = Settings.Default.PdfTopOfPage;

        bool hasSignatureLines;
        int page = 0;

        SignatureCoordinates signatureCoordinates = new SignatureCoordinates();
        public string AddSignatureBoxes(string pdfString, string pdfId)
        {
            if (log.IsDebugEnabled) log.DebugFormat(CultureInfo.InstalledUICulture, $"AddSignatureBoxes called for {pdfId}");

            string outputFilePathPdf = Path.Combine(Settings.Default.WorkFolder, $"temp_{pdfId}.pdf");
            //File.WriteAllBytes(outputFilePathPdf, Convert.FromBase64String(pdfString));

            InitializeAsposeLicense();
            var pdfDocument = CreatePdf(pdfString, outputFilePathPdf);
            string wowData = String.Empty;
            wowData = SetSignatureCoordinates(pdfDocument, wowData);

            double fontSize = 9;

            //Font steveFont = Aspose.Pdf.Text.FontRepository.OpenFont(@"C:\Windows\Fonts\STEVE.TTF");
            Font steveFont = Aspose.Pdf.Text.FontRepository.OpenFont(@"C:\Work\TF_DEV\WOW.EAPP.Common\1_DEVL\WebServices\EAppServices\STEVE.TTF");
            steveFont.IsEmbedded = true;
            var steveAppearance = new DefaultAppearance(steveFont, fontSize, System.Drawing.Color.DarkBlue);
            steveAppearance.FontName = "SteveHandwriting";
            //steveAppearance.FontName = steveFont.FontName;


            Font arialFont = FontRepository.FindFont("Arial");
            var arialAppearance = new DefaultAppearance(arialFont, fontSize, System.Drawing.Color.DarkBlue);
            arialAppearance.FontName = "Arial";

            TextBoxField piSigTextBox = CreatePiSigTextBox(pdfDocument, steveAppearance);
            pdfDocument.Form.Add(piSigTextBox, page);
            TextBoxField piDateTextBox = CreatePiDateTextBox(pdfDocument, arialAppearance);
            pdfDocument.Form.Add(piDateTextBox, page);
            TextBoxField srSigTextBox = CreateSrTextBox(pdfDocument, steveAppearance);
            pdfDocument.Form.Add(srSigTextBox, page);
            TextBoxField srDateTextBox = CreateSrDateTextBox(pdfDocument, arialAppearance);
            pdfDocument.Form.Add(srDateTextBox, page);

            Page pdfPage = (Page)pdfDocument.Pages[page];
            TextBuilder textBuilder = new TextBuilder(pdfPage);
            textBuilder.AppendText(CreateSignedBy(steveFont, signatureCoordinates.piSigXpos, signatureCoordinates.piSigYpos));
            textBuilder.AppendText(CreateSignedBy(steveFont, signatureCoordinates.salesRepSigXpos, signatureCoordinates.salesRepSigYpos));

            if (signatureCoordinates.jo1SigXpos != 0 && signatureCoordinates.jo1SigYpos != 0)
            {
                TextBoxField jo1SigTextBox = CreateJo1SigTextBox(pdfDocument, steveAppearance);
                pdfDocument.Form.Add(jo1SigTextBox, page);
                TextBoxField jo1DateTextBox = CreateJo1DateTextbox(pdfDocument, arialAppearance);
                pdfDocument.Form.Add(jo1DateTextBox, page);
                textBuilder.AppendText(CreateSignedBy(steveFont, signatureCoordinates.jo1SigXpos, signatureCoordinates.jo1SigYpos));
            }

            if (signatureCoordinates.jo2SigXpos != 0 && signatureCoordinates.jo2SigYpos != 0)
            {
                TextBoxField jo2SigTextBox = CreateJo2SigTextBox(pdfDocument, steveAppearance);
                pdfDocument.Form.Add(jo2SigTextBox, page);
                TextBoxField jo2DateTextBox = CreateJo2DateTextBox(pdfDocument, arialAppearance);
                pdfDocument.Form.Add(jo2DateTextBox, page);
                textBuilder.AppendText(CreateSignedBy(steveFont, signatureCoordinates.jo2SigXpos, signatureCoordinates.jo2SigYpos));
            }

            if (signatureCoordinates.jo3SigXpos != 0 && signatureCoordinates.jo3SigYpos != 0)
            {
                TextBoxField jo3SigTextBox = CreateJo3SigTextBox(pdfDocument, steveAppearance);
                pdfDocument.Form.Add(jo3SigTextBox, page);
                TextBoxField jo3DateTextBox = CreateJo3DateTextBox(pdfDocument, arialAppearance);
                pdfDocument.Form.Add(jo3DateTextBox, page);
                textBuilder.AppendText(CreateSignedBy(steveFont, signatureCoordinates.jo3SigXpos, signatureCoordinates.jo3SigYpos));
            }

            if (!hasSignatureLines)
            {
                CreateSignatureLines(arialFont, textBuilder);
            }
            
            //Save modified PDF
            pdfDocument.Save(outputFilePathPdf);

            byte[] pdfBytes = File.ReadAllBytes(outputFilePathPdf);
            string pdfBase64 = Convert.ToBase64String(pdfBytes);

            DeleteWorkPdf(outputFilePathPdf);

            return pdfBase64;
        }

        private void CreateSignatureLines(Font arialFont, TextBuilder textBuilder)
        {
            if (log.IsDebugEnabled) log.DebugFormat(CultureInfo.InstalledUICulture, $"CreateSignatureLines called");
            var stringLine = "Date: ___________";
            var jointLine = "Joint Owner: __________________________________";

            TextFragment appOwnerText = new TextFragment("Applicant/Owner: __________________________________");
            appOwnerText.TextState.FontSize = 8;
            appOwnerText.TextState.Font = arialFont;
            appOwnerText.TextState.ForegroundColor = Aspose.Pdf.Color.FromRgb(System.Drawing.Color.Black);
            appOwnerText.Position = new Position(signatureCoordinates.piSigXpos - 66, topOfPage - signatureCoordinates.piSigYpos - 1);
            textBuilder.AppendText(appOwnerText);

            TextFragment appOwnerDateText = new TextFragment(stringLine);
            appOwnerDateText.TextState.FontSize = 8;
            appOwnerDateText.TextState.Font = arialFont;
            appOwnerDateText.TextState.ForegroundColor = Aspose.Pdf.Color.FromRgb(System.Drawing.Color.Black);
            appOwnerDateText.Position = new Position(signatureCoordinates.piDateXpos - 21, topOfPage - signatureCoordinates.piDateYpos - 1);
            textBuilder.AppendText(appOwnerDateText);

            TextFragment jointOwner1Text = new TextFragment(jointLine);
            jointOwner1Text.TextState.FontSize = 8;
            jointOwner1Text.TextState.Font = arialFont;
            jointOwner1Text.TextState.ForegroundColor = Aspose.Pdf.Color.FromRgb(System.Drawing.Color.Black);
            jointOwner1Text.Position = new Position(signatureCoordinates.jo1SigXpos - 51, topOfPage - signatureCoordinates.jo1SigYpos - 1);
            textBuilder.AppendText(jointOwner1Text);

            TextFragment jointOwner1DateText = new TextFragment(stringLine);
            jointOwner1DateText.TextState.FontSize = 8;
            jointOwner1DateText.TextState.Font = arialFont;
            jointOwner1DateText.TextState.ForegroundColor = Aspose.Pdf.Color.FromRgb(System.Drawing.Color.Black);
            jointOwner1DateText.Position = new Position(signatureCoordinates.jo1DateXpos - 21, topOfPage - signatureCoordinates.jo1DateYpos - 1);
            textBuilder.AppendText(jointOwner1DateText);

            TextFragment jointOwner2Text = new TextFragment(jointLine);
            jointOwner2Text.TextState.FontSize = 8;
            jointOwner2Text.TextState.Font = arialFont;
            jointOwner2Text.TextState.ForegroundColor = Aspose.Pdf.Color.FromRgb(System.Drawing.Color.Black);
            jointOwner2Text.Position = new Position(signatureCoordinates.jo2SigXpos - 51, topOfPage - signatureCoordinates.jo2SigYpos - 1);
            textBuilder.AppendText(jointOwner2Text);

            TextFragment jointOwner2DateText = new TextFragment(stringLine);
            jointOwner2DateText.TextState.FontSize = 8;
            jointOwner2DateText.TextState.Font = arialFont;
            jointOwner2DateText.TextState.ForegroundColor = Aspose.Pdf.Color.FromRgb(System.Drawing.Color.Black);
            jointOwner2DateText.Position = new Position(signatureCoordinates.jo2DateXpos - 21, topOfPage - signatureCoordinates.jo2DateYpos - 1);
            textBuilder.AppendText(jointOwner2DateText);

            TextFragment jointOwner3Text = new TextFragment(jointLine);
            jointOwner3Text.TextState.FontSize = 8;
            jointOwner3Text.TextState.Font = arialFont;
            jointOwner3Text.TextState.ForegroundColor = Aspose.Pdf.Color.FromRgb(System.Drawing.Color.Black);
            jointOwner3Text.Position = new Position(signatureCoordinates.jo3SigXpos - 51, topOfPage - signatureCoordinates.jo3SigYpos - 1);
            textBuilder.AppendText(jointOwner3Text);

            TextFragment jointOwner3DateText = new TextFragment(stringLine);
            jointOwner3DateText.TextState.FontSize = 8;
            jointOwner3DateText.TextState.Font = arialFont;
            jointOwner3DateText.TextState.ForegroundColor = Aspose.Pdf.Color.FromRgb(System.Drawing.Color.Black);
            jointOwner3DateText.Position = new Position(signatureCoordinates.jo3DateXpos - 21, topOfPage - signatureCoordinates.jo3DateYpos - 1);
            textBuilder.AppendText(jointOwner3DateText);

            TextFragment salesRepText = new TextFragment("Field Associate: __________________________________");
            salesRepText.TextState.FontSize = 8;
            salesRepText.TextState.Font = arialFont;
            salesRepText.TextState.ForegroundColor = Aspose.Pdf.Color.FromRgb(System.Drawing.Color.Black);
            salesRepText.Position = new Position(signatureCoordinates.salesRepSigXpos - 62, topOfPage - signatureCoordinates.salesRepSigYpos - 1);
            textBuilder.AppendText(salesRepText);

            TextFragment salesRepDateText = new TextFragment(stringLine);
            salesRepDateText.TextState.FontSize = 8;
            salesRepDateText.TextState.Font = arialFont;
            salesRepDateText.TextState.ForegroundColor = Aspose.Pdf.Color.FromRgb(System.Drawing.Color.Black);
            salesRepDateText.Position = new Position(signatureCoordinates.salesRepDateXpos - 21, topOfPage - signatureCoordinates.salesRepDateYpos - 1);
            textBuilder.AppendText(salesRepDateText);
        }

        private TextFragment CreateSignedBy(Font font, int xCoordinate, int yCoordinate)
        {
            if (log.IsDebugEnabled) log.DebugFormat(CultureInfo.InstalledUICulture, $"CreateSrSignedBy called");
            TextFragment signedby = new TextFragment("esigned by:");

            //Set text properties
            signedby.TextState.FontSize = 8;
            signedby.TextState.Font = font;
            signedby.TextState.ForegroundColor = Aspose.Pdf.Color.FromRgb(System.Drawing.Color.DarkBlue);

            //Create TextBuilder object
            signedby.Position = new Position(xCoordinate - 51, topOfPage - yCoordinate + 9);
            return signedby;
        }

        private TextBoxField CreateJo3DateTextBox(Document pdfDocument, DefaultAppearance arialAppearance)
        {
            if (log.IsDebugEnabled) log.DebugFormat(CultureInfo.InstalledUICulture, $"CreateJo3DateTextBox called");
            TextBoxField jo3DateTextBox = new TextBoxField(pdfDocument.Pages[page], GenerateDateRectangle(signatureCoordinates.jo3DateXpos, signatureCoordinates.jo3DateYpos));
            jo3DateTextBox.HorizontalAlignment = HorizontalAlignment.Left;
            jo3DateTextBox.PartialName = "SIG_D_OWN43";
            jo3DateTextBox.DefaultAppearance = arialAppearance;
            return jo3DateTextBox;
        }

        private TextBoxField CreateJo3SigTextBox(Document pdfDocument, DefaultAppearance steveAppearance)
        {
            if (log.IsDebugEnabled) log.DebugFormat(CultureInfo.InstalledUICulture, $"CreateJo3SigTextBox called");
            TextBoxField jo3SigTextBox = new TextBoxField(pdfDocument.Pages[page], GenerateSigRectangle(signatureCoordinates.jo3SigXpos, signatureCoordinates.jo3SigYpos));
            jo3SigTextBox.HorizontalAlignment = HorizontalAlignment.Left;
            jo3SigTextBox.PartialName = "SIG_X_OWN43";
            jo3SigTextBox.DefaultAppearance = steveAppearance;
            return jo3SigTextBox;
        }

        private TextBoxField CreateJo2DateTextBox(Document pdfDocument, DefaultAppearance arialAppearance)
        {
            if (log.IsDebugEnabled) log.DebugFormat(CultureInfo.InstalledUICulture, $"CreateJo2DateTextBox called");
            TextBoxField jo2DateTextBox = new TextBoxField(pdfDocument.Pages[page], GenerateDateRectangle(signatureCoordinates.jo2DateXpos, signatureCoordinates.jo2DateYpos));
            jo2DateTextBox.HorizontalAlignment = HorizontalAlignment.Left;
            jo2DateTextBox.PartialName = "SIG_D_OWN42";
            jo2DateTextBox.DefaultAppearance = arialAppearance;
            return jo2DateTextBox;
        }

        private TextBoxField CreateJo2SigTextBox(Document pdfDocument, DefaultAppearance steveAppearance)
        {
            if (log.IsDebugEnabled) log.DebugFormat(CultureInfo.InstalledUICulture, $"CreateJo2SigTextBox called");
            TextBoxField jo2SigTextBox = new TextBoxField(pdfDocument.Pages[page], GenerateSigRectangle(signatureCoordinates.jo2SigXpos, signatureCoordinates.jo2SigYpos));
            jo2SigTextBox.HorizontalAlignment = HorizontalAlignment.Left;
            jo2SigTextBox.PartialName = "SIG_X_OWN42";
            jo2SigTextBox.DefaultAppearance = steveAppearance;
            return jo2SigTextBox;
        }

        private TextBoxField CreateJo1DateTextbox(Document pdfDocument, DefaultAppearance arialAppearance)
        {
            if (log.IsDebugEnabled) log.DebugFormat(CultureInfo.InstalledUICulture, $"CreateJo1DateTextbox called");
            TextBoxField jo1DateTextBox = new TextBoxField(pdfDocument.Pages[page], GenerateDateRectangle(signatureCoordinates.jo1DateXpos, signatureCoordinates.jo1DateYpos));
            jo1DateTextBox.HorizontalAlignment = HorizontalAlignment.Left;
            jo1DateTextBox.PartialName = "SIG_D_OWN2";
            jo1DateTextBox.DefaultAppearance = arialAppearance;
            return jo1DateTextBox;
        }

        private TextBoxField CreateJo1SigTextBox(Document pdfDocument, DefaultAppearance steveAppearance)
        {
            if (log.IsDebugEnabled) log.DebugFormat(CultureInfo.InstalledUICulture, $"CreateJo1SigTextBox called");
            TextBoxField jo1SigTextBox = new TextBoxField(pdfDocument.Pages[page], GenerateSigRectangle(signatureCoordinates.jo1SigXpos, signatureCoordinates.jo1SigYpos));
            jo1SigTextBox.HorizontalAlignment = HorizontalAlignment.Left;
            jo1SigTextBox.PartialName = "SIG_X_OWN2";
            jo1SigTextBox.DefaultAppearance = steveAppearance;
            return jo1SigTextBox;
        }

        private TextBoxField CreateSrDateTextBox(Document pdfDocument, DefaultAppearance arialAppearance)
        {
            if (log.IsDebugEnabled) log.DebugFormat(CultureInfo.InstalledUICulture, $"CreateSrDateTextBox called");
            TextBoxField srDateTextBox = new TextBoxField(pdfDocument.Pages[page], GenerateDateRectangle(signatureCoordinates.salesRepDateXpos, signatureCoordinates.salesRepDateYpos));
            srDateTextBox.HorizontalAlignment = HorizontalAlignment.Left;
            srDateTextBox.PartialName = "SIG_D_AGENT";
            srDateTextBox.DefaultAppearance = arialAppearance;
            return srDateTextBox;
        }

        private TextBoxField CreateSrTextBox(Document pdfDocument, DefaultAppearance steveAppearance)
        {
            if (log.IsDebugEnabled) log.DebugFormat(CultureInfo.InstalledUICulture, $"CreateSrTextBox called");
            TextBoxField srSigTextBox = new TextBoxField(pdfDocument.Pages[page], GenerateSigRectangle(signatureCoordinates.salesRepSigXpos, signatureCoordinates.salesRepSigYpos));
            srSigTextBox.HorizontalAlignment = HorizontalAlignment.Left;
            srSigTextBox.PartialName = "SIG_X_AGENT";
            srSigTextBox.DefaultAppearance = steveAppearance;
            return srSigTextBox;
        }

        private TextBoxField CreatePiDateTextBox(Document pdfDocument, DefaultAppearance arialAppearance)
        {
            if (log.IsDebugEnabled) log.DebugFormat(CultureInfo.InstalledUICulture, $"CreatePiDateTextBox called");
            TextBoxField piDateTextBox = new TextBoxField(pdfDocument.Pages[page], GenerateDateRectangle(signatureCoordinates.piDateXpos, signatureCoordinates.piDateYpos));
            piDateTextBox.HorizontalAlignment = HorizontalAlignment.Left;
            piDateTextBox.PartialName = "SIG_D_APPCNT";
            piDateTextBox.DefaultAppearance = arialAppearance;
            return piDateTextBox;
        }

        private TextBoxField CreatePiSigTextBox(Document pdfDocument, DefaultAppearance steveAppearance)
        {
            if (log.IsDebugEnabled) log.DebugFormat(CultureInfo.InstalledUICulture, $"CreatePiSigTextBox called");
            TextBoxField piSigTextBox = new TextBoxField(pdfDocument.Pages[page], GenerateSigRectangle(signatureCoordinates.piSigXpos, signatureCoordinates.piSigYpos));
            piSigTextBox.HorizontalAlignment = HorizontalAlignment.Left;
            piSigTextBox.PartialName = "SIG_X_APPCNT";
            piSigTextBox.DefaultAppearance = steveAppearance;
            return piSigTextBox;
        }

        private string SetSignatureCoordinates(Document pdfDocument, string wowData)
        {
            if (log.IsDebugEnabled) log.DebugFormat(CultureInfo.InstalledUICulture, $"SetSignatureCoordinates called");
            // looking for WowData in pdf metadata for signature coordinates
            foreach (DictionaryEntry workVal in pdfDocument.Metadata.Values)
            {
                if (workVal.Key.ToString().Contains("WowData"))
                {
                    wowData = workVal.Value.ToString();
                }
            }

            if (wowData != String.Empty)
            {
                hasSignatureLines = true;
                SetWowSigCoordinates(ref page, ref signatureCoordinates, wowData);
            }
            else
            {
                hasSignatureLines = false;
                SetNoSigCoordinates(ref page, ref signatureCoordinates);
            }

            return wowData;
        }

        private static void SetWowSigCoordinates(ref int page, ref SignatureCoordinates signatureCoordinates, string wowData)
        {
            if (log.IsDebugEnabled) log.DebugFormat(CultureInfo.InstalledUICulture, $"SetWowSigCoordinates called");
            //example of metadata in wowData: /WowData (P[4],S2[99~527],D2[269~527],S1[99~573],D1[269~573])
            string[] arguments = wowData.Split(',');
            foreach (var arg in arguments)
            {
                string[] workData = arg.ToString().Replace('[', '~').Replace(']', '~').Split('~'); //
                switch (workData[0])
                {
                    case "P":   // Page to place sigatures
                        page = Convert.ToInt32(workData[1]);
                        break;
                    case "S1":  // Sales Rep Signature
                        signatureCoordinates.salesRepSigXpos = Convert.ToInt32(workData[1]);
                        signatureCoordinates.salesRepSigYpos = Convert.ToInt32(workData[2]);
                        break;
                    case "D1":  // Sales Rep Signature Date
                        signatureCoordinates.salesRepDateXpos = Convert.ToInt32(workData[1]);
                        signatureCoordinates.salesRepDateYpos = Convert.ToInt32(workData[2]);
                        break;
                    case "S2":  //  Owner 1 (Proposed Insured/Proposed Owner) Signature
                        signatureCoordinates.piSigXpos = Convert.ToInt32(workData[1]);
                        signatureCoordinates.piSigYpos = Convert.ToInt32(workData[2]);
                        break;
                    case "D2":  //  Owner 1 (Proposed Insured/Proposed Owner) Signature Date
                        signatureCoordinates.piDateXpos = Convert.ToInt32(workData[1]);
                        signatureCoordinates.piDateYpos = Convert.ToInt32(workData[2]);
                        break;
                    case "S3":  // Owner 2 (Proposed Joint Owner 1) Signature
                        signatureCoordinates.jo1SigXpos = Convert.ToInt32(workData[1]);
                        signatureCoordinates.jo1SigYpos = Convert.ToInt32(workData[2]);
                        break;
                    case "D3":  // Owner 2 (Proposed Joint Owner 1) Signature Date
                        signatureCoordinates.jo1DateXpos = Convert.ToInt32(workData[1]);
                        signatureCoordinates.jo1DateYpos = Convert.ToInt32(workData[2]);
                        break;
                    case "S4":  // Owner 3 (Proposed Joint Owner 2) Signature
                        signatureCoordinates.jo2SigXpos = Convert.ToInt32(workData[1]);
                        signatureCoordinates.jo2SigYpos = Convert.ToInt32(workData[2]);
                        break;
                    case "D4":  // Owner 3 (Proposed Joint Owner 2) Signature Date
                        signatureCoordinates.jo2DateXpos = Convert.ToInt32(workData[1]);
                        signatureCoordinates.jo2DateYpos = Convert.ToInt32(workData[2]);
                        break;
                    case "S5":  // Owner 4 (Proposed Joint Owner 3) Signature
                        signatureCoordinates.jo3SigXpos = Convert.ToInt32(workData[1]);
                        signatureCoordinates.jo3SigYpos = Convert.ToInt32(workData[2]);
                        break;
                    case "D5":  // Owner 4 (Proposed Joint Owner 3) Signature Date
                        signatureCoordinates.jo3DateXpos = Convert.ToInt32(workData[1]);
                        signatureCoordinates.jo3DateYpos = Convert.ToInt32(workData[2]);
                        break;
                }
            }
        }

        private static void SetNoSigCoordinates(ref int page, ref SignatureCoordinates signatureCoordinates)
        {
            if (log.IsDebugEnabled) log.DebugFormat(CultureInfo.InstalledUICulture, $"SetNoSigCoordinates called");
            int column1 = 80;
            int column1Xdate = 257;
            int column2 = 367;
            int column2Xdate = 544;
            int row1Y = 690;
            int row2Y = 710;
            int row3Y = 730;

            page = 1;
            signatureCoordinates.piSigXpos = column1;
            signatureCoordinates.piSigYpos = row1Y;
            signatureCoordinates.piDateXpos = column1Xdate;
            signatureCoordinates.piDateYpos = row1Y;
            signatureCoordinates.jo1SigXpos = column2;
            signatureCoordinates.jo1SigYpos = row1Y;
            signatureCoordinates.jo1DateXpos = column2Xdate;
            signatureCoordinates.jo1DateYpos = row1Y;
            signatureCoordinates.jo2SigXpos = column1;
            signatureCoordinates.jo2SigYpos = row2Y;
            signatureCoordinates.jo2DateXpos = column1Xdate;
            signatureCoordinates.jo2DateYpos = row2Y;
            signatureCoordinates.jo3SigXpos = column2;
            signatureCoordinates.jo3SigYpos = row2Y;
            signatureCoordinates.jo3DateXpos = column2Xdate;
            signatureCoordinates.jo3DateYpos = row2Y;
            signatureCoordinates.salesRepSigXpos = column1;
            signatureCoordinates.salesRepSigYpos = row3Y;
            signatureCoordinates.salesRepDateXpos = column1Xdate;
            signatureCoordinates.salesRepDateYpos = row3Y;
        }

        private static Rectangle GenerateSigRectangle(int fromPdfX, int fromPdfY)
        {
            if (log.IsDebugEnabled) log.DebugFormat(CultureInfo.InstalledUICulture, $"GenerateSigRectangle called");
            int lowerLeftX = fromPdfX - 5;
            int lowerLeftY = topOfPage - fromPdfY;
            int upperRightX = lowerLeftX + 157;
            int upperRightY = lowerLeftY + 17;
            return new Aspose.Pdf.Rectangle(lowerLeftX, lowerLeftY, upperRightX, upperRightY);
        }
        private static Rectangle GenerateDateRectangle(int fromPdfX, int fromPdfY)
        {
            if (log.IsDebugEnabled) log.DebugFormat(CultureInfo.InstalledUICulture, $"GenerateDateRectangle called");
            int lowerLeftX = fromPdfX - 1;
            int lowerLeftY = topOfPage - fromPdfY;
            int upperRightX = lowerLeftX + 60;
            int upperRightY = lowerLeftY + 17;
            return new Aspose.Pdf.Rectangle(lowerLeftX, lowerLeftY, upperRightX, upperRightY);
        }
        private void DeleteWorkPdf(string outputFilePathPdf)
        {
            if (log.IsDebugEnabled) log.DebugFormat(CultureInfo.InstalledUICulture, $"DeleteWorkPdf called");
            File.Delete(outputFilePathPdf);
        }

        private Document CreatePdf(string base64pdf, string outputFilePathPdf)
        {
            if (log.IsDebugEnabled) log.DebugFormat(CultureInfo.InstalledUICulture, $"CreatePdf called");

            if (!Directory.Exists(Settings.Default.WorkFolder))
            {
                Directory.CreateDirectory(Settings.Default.WorkFolder);
            }

            var policy = Polly.Policy.Handle<IOException>()
                .WaitAndRetry(Settings.Default.FileIOProcessRetries, attempt => TimeSpan.FromTicks(Settings.Default.FileIOProcessDelay.Ticks * attempt),
                (ex, timeSpan) =>
                {
                    if (log.IsErrorEnabled) log.Error($"There was an error creating PDF file: {outputFilePathPdf}.", ex);

                    if (log.IsFatalEnabled)
                    {
                        ILog logger = LogManager.GetLogger("EmailErrorLogger");
                        log.Fatal($"There was an error creating PDF file: {outputFilePathPdf}.", ex);
                    }
                });

            policy.Execute(() => File.WriteAllBytes(outputFilePathPdf, Convert.FromBase64String(base64pdf)));
            if (log.IsDebugEnabled) log.Debug($"PDF file {outputFilePathPdf} contents saved.");

            Document pdfDocument = new Document(outputFilePathPdf);
            return pdfDocument;
        }

        private static void InitializeAsposeLicense()
        {
            if (log.IsDebugEnabled) log.DebugFormat(CultureInfo.InstalledUICulture, $"InitializeAsposeLicense called");            
            // Create a PDF license object
            License license = new License();
            // Instantiate license file
            license.SetLicense(@"Aspose.Total.Product.Family.lic");
            // Set the value to indicate that license will be embedded in the application
            license.Embedded = true;
        }
    }
}

@Darkwater23,
We managed to replicate the problem of not being able to apply font in the text box field. We have logged an investigation under the ticket ID PDFNET-42947 in our issue tracking system. We have linked your post to this ticket and will keep you informed regarding any available updates. We are sorry for the inconvenience caused.

Best Regards,
Imran Rafique

Any update on this issue? Thanks!

@Darkwater23

Thanks for your inquiry.

As we have recently been notified about the issue, so I am afraid it is not yet resolved. Though product team will plan to investigate it as per their development schedule and as soon as we have some updates in this regard, we will let you know. Please be patient and spare us little time.

We are sorry for the inconvenience.

Any update on this issue? We’d still like to make this work on our side. Thanks!

@Darkwater23

Thanks for your inquiry.

I am afraid that earlier logged issue is not yet resolved due to high number of pending issues in the queue. Since, this issue has been logged under free support model, it will be resolved on first come first serve basis. As soon as we have some definite updates regarding resolution of the issue, we will let you know. Please spare us little time.

We are sorry for the inconvenience.