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.

Sun Sep 11, 2022 8:57 pm

Hello,

i need to show or hide specific elements in a prebuild pdf template i do not manage.

Depending on the information displayed, i need to set the visible property of a checkbox or textboxfield.

But the "PdfTextBoxFieldWidget" does not have a setter attribute. So How do i achieve this?:

Code: Select all
                            if (formWidgetCollection[fieldsDict[_fieldName]] is PdfTextBoxFieldWidget)
                            {
                                (formWidgetCollection[fieldsDict[_fieldName]] as PdfTextBoxFieldWidget).Text = _value.Text;
                                (formWidgetCollection[fieldsDict[_fieldName]] as PdfTextBoxFieldWidget).Visible = true; //<< no setter attribute
                                (formWidgetCollection[fieldsDict[_fieldName]] as PdfTextBoxFieldWidget).ReadOnly = _value.IsReadOnly;
                            }

c3rebro_No1
 
Posts: 1
Joined: Sun Sep 11, 2022 8:47 pm

Tue Sep 13, 2022 8:52 am

Hello c3rebro_No1,

Thanks for your inquiry.
There is the visible property for the checkbox and textbox field. For example, you can use “textbox.visible = false“ to hide the textbox. If there are any problems after the test, please provide us with your test documents for our further investigation. You can attach them here or send them via email(support@e-iceblue.com).

Sincerely,
Simple
E-iceblue support team
User avatar

Simple.Li
 
Posts: 248
Joined: Fri Jul 01, 2022 2:33 am

Return to Spire.PDF