Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.
Sat May 05, 2018 9:31 am
how to make textbox as shown in textbofield_display.JPG and where can I find option properties to set this option for textbox in spire.PDF?
Login to view the files attached to this post.
-
chintalpatel89
-
- Posts: 16
- Joined: Sun Dec 25, 2016 9:54 am
Mon May 07, 2018 6:31 am
Hello,
Thanks for your inquiry.
You could use the properties "MaxLength" and "InsertSpaces" to accomplish your task.
- Code: Select all
PdfDocument pdf = new PdfDocument();
PdfPageBase page = pdf.Pages.Add();
PdfTextBoxField textbox = new PdfTextBoxField(page, "TextBox");
textbox.MaxLength = 10;
textbox.InsertSpaces = true;
textbox.Bounds = new RectangleF(50, 50, 150, 15);
textbox.BorderWidth = 0.75f;
textbox.BorderStyle = PdfBorderStyle.Solid;
pdf.Form.Fields.Add(textbox);
pdf.SaveToFile("13732.pdf");
Sincerely,
Jane
E-iceblue support team
-
Jane.Bai
-
- Posts: 1156
- Joined: Tue Nov 29, 2016 1:47 am
Wed May 16, 2018 4:46 pm
Thank you. It worked.
-
chintalpatel89
-
- Posts: 16
- Joined: Sun Dec 25, 2016 9:54 am
Thu May 17, 2018 2:06 am
Hello chintalpatel89,
Thank you for your valuable feedback.
Just feel free to contact us if you need any assistance.
Sincerely,
Jane
E-iceblue support team
-
Jane.Bai
-
- Posts: 1156
- Joined: Tue Nov 29, 2016 1:47 am