We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Throw exception if there are more than 1 TextField have same name

Thread ID:

Created:

Updated:

Platform:

Replies:

97899 Jan 18,2011 06:43 PM UTC Feb 5,2016 11:48 AM UTC ASP.NET Web Forms (Classic) 5
loading
Tags: PDF
kim
Asked On January 18, 2011 06:43 PM UTC

Hi There!

I tried to load a PDF form and I got an exception if there were more than 1 TextBoxField have the same "Name".( It works fine if there is no duplicated field name.)

Thanks!

I am using Syncfusion.Pdf.Base, (ver 8.103.0.30) .Net3.5, WinXP

~~~~~~~~~~~~~~~~~~~~~~

string _pdfInputPath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + @"\SameNamePDF_new.pdf";

//string _pdfInputPath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + @"\NOTSameNamePDF.pdf";

private void CreatePDFFieldList()
{
PdfLoadedDocument loadedDocument = new PdfLoadedDocument(this._pdfInputPath);
PdfLoadedForm form = loadedDocument.Form;//EXCEPTION IS HERE
loadedDocument.Close(true);
}



PDF NAME_c3b4eed2.rar

Priyadharshini J [Syncfusion]
Replied On January 19, 2011 01:14 PM UTC

Hi kim,

Thank you for the details.

As per the rules we cannot create two form fields with the same name. Form fields are not retrieved from the document when they have same name, hence no objects are loaded and it shows 'Value cannot be null exception'.

Please let us know if you have any queries.

Regards,
Priyadharshini


kim
Replied On January 19, 2011 02:07 PM UTC

Hi Priyadharshini!

Thanks for the info. Is the rule going to changed?

Because the PDF form allows to add fields with the same name which is common use (EX: Company name , person name are on each page of a document ..etc, so if a document has a thousand pages, and the users have to create a thousand Fields with different names?Do they want to do it? are they going to make mistake? )

I think most of the time the end user create the PDF, not the programmers who use Syncfusion dll, so the programmers can not prevent this problem.

It is just my opinion.

Thanks!


Priyadharshini J [Syncfusion]
Replied On January 20, 2011 10:24 AM UTC

Hi Kim,

Thank you for the details.

We could see the problem and suspect this could be a defect. We have forwarded this to our development team for further analysis.

Could you please report this issue through Direct Trac Developer Support System
https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents because you can take the advantage of the expertise of a dedicated support engineer and a guaranteed response time and we hope you will take advantage of this system as well. If you have already reported, please ignore this.

Please let us know if you have any queries.

Regards,
Priyadharshini


Steve Lauer
Replied On February 4, 2016 11:15 PM UTC

Hi Kim,

Thank you for the details.

We could see the problem and suspect this could be a defect. We have forwarded this to our development team for further analysis.

Could you please report this issue through Direct Trac Developer Support System
https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents because you can take the advantage of the expertise of a dedicated support engineer and a guaranteed response time and we hope you will take advantage of this system as well. If you have already reported, please ignore this.

Please let us know if you have any queries.

Regards,
Priyadharshini


Utilizing the most current version.  This issue does not seem to be resolved:

https://www.syncfusion.com/forums/97899/throw-exception-if-there-are-more-than-1-textfield-have-same-name

Will it be resolved?

Chinnu Muniyappan [Syncfusion]
Replied On February 5, 2016 11:48 AM UTC

Hi Steve,
We have created a simple sample for loading a PDF document to more than text box fields with the same name, and also we haven’t receive any exceptions in our current version. Please find the below details

1.       If more than one field with same name, the same named fields are moved to a single group so we have to access the fields using that group. Please refer the below code snippet for how to access the group items.


            //Load the text box field

            PdfLoadedTextBoxField lfield = lform.Fields[0] as PdfLoadedTextBoxField;

            

            //access the child fields of the text box

     PdfLoadedTexBoxItem item = lfield.Items[2];


2.       If we fill the parent field it will automatically filled all the child fields, it is the default behavior.


lfield.Text = "testing";


3.       And also we have attached the video for your reference, please refer the video and sample

http://www.syncfusion.com/downloads/support/directtrac/150704/ze/WinApp1-865942153



Regards,
Chinnu


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;