Setting Opacity of TextField Annotation using Markup doesnot work.

You should not have to do anything to have a transparent background, that is the “default”. Actually most PDF viewers will auto-highlight form fields at runtime.

The following code will add a text field with no background.

`
// DEBUG - add dummy page to make the example clearer
Page blank_page = doc.PageCreate();
var builder = new ElementBuilder();
var writer = new ElementWriter();
writer.Begin(blank_page, ElementWriter.WriteMode.e_overlay);
var element = builder.CreateRect(0, 0, blank_page.GetPageWidth(), blank_page.GetPageHeight());
element.GetGState().SetFillColorSpace(ColorSpace.CreateDeviceRGB());
element.GetGState().SetFillColor(new ColorPt(1, 0, 1));
element.SetPathFill(true);
writer.WriteElement(element);
writer.End();
// END DEBUG - following code is the important part

// create field
Field emp_first_name = doc.FieldCreate(“employee.name.first”, Field.Type.e_text, doc.CreateIndirectString(“John”));

// set appearance of field. No background (Transparent) and cyan border
pdftron.PDF.Annots.Widget annot1 = pdftron.PDF.Annots.Widget.Create(doc.GetSDFDoc(), new Rect(50, 550, 350, 600), emp_first_name);
annot1.SetBorderStyle(new Annot.BorderStyle(Annot.BorderStyle.Style.e_solid, 2.0));
annot1.SetBorderColor(new ColorPt(0, 1, 1), 3);
annot1.RefreshAppearance();

// add annotation to page, and page to document
blank_page.AnnotPushBack(annot1);
doc.PagePushBack(blank_page);
`