Fill in PDF Form Fields Using ceTe.DynamicPDF.40.dll

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF Merger for .NET (v4)  /  Fill in PDF Form Fields Using ceTe.DynamicPDF.40.dll

DynamicPDF Merger for .NET (v4) Forum

Hi,
I am using ceTe.DynamicPDF.40.dll to display data on the pdf form fields. I am not able to set the fontsize of the filed value displaed in pdf. Here is my code,
 else if (form == "FunExer")
                {
                    filePath = Server.MapPath("PrintForms") + System.IO.Path.DirectorySeparatorChar + ConfigurationManager.AppSettings["FunExerForm"];

                    PdfDocument pdfDocument = new PdfDocument(filePath);
                    MergeDocument document = new MergeDocument();
                    document.Append(pdfDocument);
                    document.Form.Fields["WCB Case"].Value = this.WCBNum;                   
                     document.Form.Fields["WCB Case"].FontSize = 20;
                     document.DrawToWeb("Funletter.pdf");
                }

the code document.Form.Fields["WCB Case"].FontSize = 20;  does not work.
Posted by a ceTe Software moderator
Hello,

We tested this on our end using version 11 and are able to set the font size for the form field. Here is a code sample:

            string filePath = @"Source PDF file path";
            PdfDocument pdfDocument = new PdfDocument(filePath);
            MergeDocument document = new MergeDocument();
            document.Append(pdfDocument);
            document.Form.Fields["form field name"].Value = "filled Value";
            document.Form.Fields["Form field name"].FontSize = 20;
            string output = @"Output PDF file path";
            document.Draw(output);

Please try using the latest version, version 11 and see if it works for you. You can download latest from NuGet (Package ID: ceTe.DynamicPDF.CoreSuite.NET) or from our website here

If you continue having an issue, please send over the following information to support@dynamicpdf.com so we can look into it further.

1.        Code sample which uses static data to recreate the behavior.
2.        Source PDF used for merging and filling.
3.        Output PDF (Save the PDF to disk and send it over to us).
4.        Exact version and build number of the DynamicPDF DLL file used in your application. You can find this information by right clicking on the DynamicPDF DLL file>>Properties>>Details tab>>Product version. Take a screenshot of Details tab and send it over to us.

Thanks,
ceTe Software Support Team

All times are US Eastern Standard time. The time now is 6:28 AM.