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

Free Support Forum - aspose.com

Text FormField Cannot Be Edited

I am trying to create a table which has some text, but also has a textbox for someone to enter their name. When i create the formfield it cannot be edited in the document. It shows up like editing a comment. The table is in a seperate pdf which gets concatenated with some other pdf’s. I don’t know if when i combine the pdf’s the text box is no longer editable. Here is my code to construct the table:

private Aspose.Pdf.Table CreateSignatureBox(string attestation)
Aspose.Pdf.Table table = new Aspose.Pdf.Table();
table.ColumnWidths = “500”;
table.DefaultCellBorder = new BorderInfo((int)BorderSide.None);
table.BackgroundColor = new Aspose.Pdf.Color(224, 224, 224);
table.Border = new BorderInfo((int)BorderSide.All, 2, new Aspose.Pdf.Color(“Black”));
table.Alignment = Aspose.Pdf.AlignmentType.Center;

MarginInfo marginInfo = new MarginInfo();
marginInfo.Top = 5;
marginInfo.Left = 5;
marginInfo.Right = 5;
marginInfo.Bottom = 5;
table.DefaultCellPadding = marginInfo;

TextInfo headerTextInfo = new TextInfo();
headerTextInfo.IsTrueTypeFontBold = true;
headerTextInfo.FontSize = 14;
headerTextInfo.IsUnderline = true;
headerTextInfo.FontName = “Arial”;

TextInfo boldTextInfo = new TextInfo();
boldTextInfo.IsTrueTypeFontBold = true;
boldTextInfo.FontSize = 12;
boldTextInfo.FontName = “Arial”;

TextInfo regularTextInfo = new TextInfo();
regularTextInfo.IsTrueTypeFontBold = false;
regularTextInfo.FontSize = 12;
regularTextInfo.FontName = “Arial”;

Aspose.Pdf.Row rowHeader = table.Rows.Add();
rowHeader.Cells.Add(“Electronic Signature”, headerTextInfo);

Aspose.Pdf.Row rowAttestation = table.Rows.Add();
Text attestationText = new Text(attestation, regularTextInfo);
attestationText.IsHtmlTagSupported = true;

Aspose.Pdf.FormField textField = new Aspose.Pdf.FormField();
textField.FormFieldType = FormFieldType.Text;
textField.FieldName = “ATextField”;
textField.FormWidth = 80;
textField.FormHeight = 20;
textField.FieldValue = “Text Edit”;
textField.IsReadOnly = false;
textField.ComboIsEditable = true;
textField.BorderColor = System.Drawing.Color.Black;
textField.BackgroundColor = System.Drawing.Color.Red;

Aspose.Pdf.Row rowSignature = table.Rows.Add();
Aspose.Pdf.Cell rowCell = rowSignature.Cells.Add();

return table;

Scott Freeman

Dear Scott,

I can't reproduce this error. Are you using the latest version?

Yes I am using the latest version. As I mentioned, the table is added to a new pdf and then concatenated with other pdf’s. Please let me know if you need more information.

In my test the PDF is created correctly. Please make sure the problem is in PDF concatenation and provide code and files that can reproduce this error.