Flatten Form Fields

Flatten Form Fields

Forum member · Jan 27, 2010
I have an existing PDF with form fields that already have values. I know how to flatten it and create labels for the fields but how can I set the text alignment, font size, font color of the labels to the exact same values that the form fields have? In the code below, I can set the value of the label to the value of the form field by using "field.GetValue()". How can I set the font, font size, and text align to match the fields as well? ceTe.DynamicPDF.Merger.PdfDocument pdf = new ceTe.DynamicPDF.Merger.PdfDocument(pdfFullFileName); MergeDocument merDocument = new MergeDocument(pdf, new MergeOptions(false)); for (int i = 0; i < pdf.Form.Fields.Count; i++) { PdfFormField field = pdf.Form.Fields[i]; if (field is PdfTextField) { field.CreateLabel(merDocument.Pages[(field.GetOriginalPageNumber() - 1)], field.GetValue(), ceTe.DynamicPDF.Text.FormFont.Courier, 12, ceTe.DynamicPDF.TextAlign.Center); } }

Re: Flatten Form Fields

Support · Jan 28, 2010
Hello, The feature of getting the font and alignment information of an existing form field has been added to the latest version v6 of our product. This is not possible using the v5 of our product. Currently v6 is in beta and please feel free to download the DynamicPDF v6 for .NET Beta from our website. Thanks, ceTe Software Support Team.

Re: Flatten Form Fields

Forum member · Jan 29, 2010
Will V6 feature the text color as well? Do you have an estimated time frame as to when V6 will be ready (out of the beta stage)?

Re: Flatten Form Fields

Support · Feb 1, 2010
Hello, Yes, you can get the text color using the TextColor property of the PdfFormField class using the v6 of our product. We may have the final release of v6 in 4 to 6 weeks time if the Beta goes well. This is an estimation and it may also change. Thanks, ceTe Software Support Team.