Class PdfFormFieldVisibility
Specifies the form field visibility types
Inheritance
System.Object
PdfFormFieldVisibility
Namespace: Syncfusion.Pdf.Interactive
Assembly: Syncfusion.Pdf.Base.dll
Syntax
public sealed class PdfFormFieldVisibility : Enum
Examples
//Create a new PDf document
PdfDocument document = new PdfDocument();
//Creates a new page and adds it as the last page of the document
PdfPage page = document.Pages.Add();
PdfFont font = new PdfStandardFont(PdfFontFamily.Courier, 12f);
//Create a text box
PdfTextBoxField firstNameTextBox = new PdfTextBoxField(page, "firstNameTextBox");
firstNameTextBox.MaxLength = 8;
firstNameTextBox.Bounds = new RectangleF(100, 20, 200, 20);
firstNameTextBox.Font = font;
//Set the visibility.
firstNameTextBox.Visibility = PdfFormFieldVisibility.Visible;
page.Graphics.DrawString("First Name", font, PdfBrushes.Black, 10, 55);
//Add the textbox in document
document.Form.Fields.Add(firstNameTextBox);
document.Save("Form.pdf");
document.Close(true);
'Create a new PDf document
Dim document As PdfDocument = New PdfDocument()
'Create a page
Dim page As PdfPage = document.Pages.Add()
Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Courier, 12f)
'Create a text box
Dim firstNameTextBox As PdfTextBoxField = New PdfTextBoxField(page, "firstNameTextBox")
firstNameTextBox.MaxLength = 8
firstNameTextBox.Bounds = New RectangleF(100, 20, 200, 20)
firstNameTextBox.Font = font
'Set the visibility.
firstNameTextBox.Visibility = PdfFormFieldVisibility.Visible
page.Graphics.DrawString("First Name", font, PdfBrushes.Black, 10, 55)
'Add the textbox in document
document.Form.Fields.Add(firstNameTextBox)
document.Save("Form.pdf")
document.Close(True)
Fields
Hidden
Hidden the visibility of the form field.
Declaration
public const PdfFormFieldVisibility Hidden
Field Value
Type |
---|
PdfFormFieldVisibility |
HiddenPrintable
Indicates form fields as hidden but printable.
Declaration
public const PdfFormFieldVisibility HiddenPrintable
Field Value
Type |
---|
PdfFormFieldVisibility |
Visible
Indicate visibility of the form field.
Declaration
public const PdfFormFieldVisibility Visible
Field Value
Type |
---|
PdfFormFieldVisibility |
VisibleNotPrintable
Indicate visibility of the form field and not printable.
Declaration
public const PdfFormFieldVisibility VisibleNotPrintable
Field Value
Type |
---|
PdfFormFieldVisibility |