Read XFA form fields and fill data using Aspose.PDF for .NET

Hi again,

Note that in the codesnippet shared on my last post i'm trying fill out the data of both persons (presentador and sol·licitant).

Case 1: If you selected 'Sóc la persona interessada (sol·licitant)' radio button.

The form has 3 pages. Page 1 is the sol·licitant data.

The form shows only the sol·licitant form field's. This is right because the form shows sol·licitant field's with data (filled out) and you choosed this option in form.

Case 2: If you selected 'Actuo en nom de la persona sol·licitant (presentador)' radio button.

The form has 4 pages. Page 1 is the presentador data AND Page 2 is the sol·licitant data.

The form shows the presentador field's with data (filled out) AND the sol·licitant field's without data (not filled out). This is the problem, because on my codesnippet i want fillout both of them (sol·licitant and presentador) and only can see filled out the presentador field's.

RESUME:

I want fill out the fields of both persons (sol·licitant and presentador). So, when open the PDF i must select 'Actuo en nom de la persona sol·licitant (presentador)'. After this, i only can see well filled out the presentador field's (page 1) but not the sol·licitant field's (page 2) because they are empty.

Hi Jose,

Thanks for sharing the details.
<span style=“font-size:10.0pt;font-family:“Arial”,“sans-serif””>

I
have again tested the scenario and I am able to reproduce the same problem. For the
sake of correction, I have logged it in our issue tracking system as <span style=“font-family:“Arial”,“sans-serif””>PDFNEWNET-34043. We
will investigate this issue in details and will keep you updated on the status
of a correction.

<span style=“font-size:10.0pt;font-family:“Arial”,“sans-serif””><span style=“font-size:10.0pt;font-family:“Arial”,“sans-serif””>We
apologize for your inconvenience.

Thank you Nayyer.

Please, add too in your issue tracking system the JavaScrip error issue shared by me few posts ago. As you wrote, could be because combo data was not pupulated yet when the form field was filled out. Thist only occurs in combo fields with relational data population like PROVINCIA' (State) and 'MUNICIPI' (City).

newinformatics:
Please, add too in your issue tracking system the JavaScrip error issue shared by me few posts ago. As you wrote, could be because combo data was not pupulated yet when the form field was filled out. Thist only occurs in combo fields with relational data population like PROVINCIA’ (State) and ‘MUNICIPI’ (City).

Hi Jose,

I have again tested the scenario while using the code snippet shared over 398616 link and I have managed to reproduce the same problem. When trying to view the resultant PDF in Adobe Reader 10.1.3, I am also getting the same error messages. In order to get this issue resolved, I have separately logged it as PDFNEWNET-34044 in our issue tracking system. We will further look into the details of this problem and will keep you updated on the status of correction. Please be patient and spare us little time. We are sorry for this inconvenience.

PS, In my reply over
398692 here, I did not provide the complete field name, so the information was not being populated in resultant PDF.

No problem Nayyer, I'm patient :) .Thanks for your work.

Hi Nayyer, please help me with this:

On this PDF form there are two kind of people: Sol·licitant and Presentador.

In both of them, there are two kind too:

- Sol·licitant as fisic person - Sol·licitant as legal person (Enterprise)

- Presentador as fisic person - Presentador as legal person (Enterprise)

In this case i need fill out Sol·licitant form fields as legal person (Enterprise). So, i need select 'Persona jurídica' on radiobutton.

Scenario:

Open the PDF and select the radiobutton 'Sóc la persona interessada (sol·licitant)'.

On Sol·licitant form fields, the first field is a RadioButton type. The options are: 'Persona física' and 'Persona jurídica'. Is selected 'Persona física' by default but i need select 'Persona jurídica' because i want fill out the field 'Raó social'.

My Tests:

I'm not able to select by default 'Persona jurídica' in radiobutton. The codesnippet i used to filling out the 'Raó social' is:

pdfDocument.Form.XFA[GTIS_PICA_GRO_SOLLICITUD.requeridor.PERSONA_FISICA_O_JURIDICA.PERSONA_JURIDICA.DADES_IDENTIFICACIO_EMPRESA.CONTACTE.TXT_NOM_EMPRESA] = 'MYENTERPRISE & CO'. I think the radiobutton fields could be:

GSIT_PICA_GRO_SOLLICITUD.requeridor.PERSONA_FISICA_O_JURIDICA.FISICA

GSIT_PICA_GRO_SOLLICITUD.requeridor.PERSONA_FISICA_O_JURIDICA.FISICA

GSIT_PICA_GRO_SOLLICITUD.requeridor.PERSONA_FISICA_O_JURIDICA.TIPUS_USUARI

I tried assign values 'S' or 'N' but not works. By default always 'Persona física' is selected and when i select manually 'Persona jurídica', the 'Raó social' field is empty.

Can you post me a codesnippet and result filled pdf for this case?. I tried but i'm not be able do it.

this could be a new issue or is there an error on my procediment?.

Thanks a lot.

Sorry for my last post. It woks!. Please do not notice my last post.

Hi Jose,

I am glad to hear that your problem is resolved or you have figured out the solution. Please do let me know, if I can be of any further assistance.

Thanks for contacting support.

Hi, Any news about this issues?.

PDFNEWNET-34043

PDFNEWNET-34044

Thanks

Hi,


Thanks for your patience.

Our development team is working hard
on resolving this issue but I am afraid this problem is not yet
completely fixed. Nevertheless, I have requested the development team to share
any possible ETA. As soon as I have some updates regarding its resolution, I
would be more than happy to update you with the status of correction. Please be
patient and spare us little time.

We are sorry for this delay and inconvenience.

Hi,


Thanks for your patience.

We have further investigated the issue PDFNEWNET-34044 and have found the reasons of problem. In your source form, provinces and cities have specific codes:

//provincies:
var arrProvinciesEsp = new Array([“Álava”,“01”,“arrAlaba”], [“Albacete”,“02”,“arrAlbacete”], [“Alicante/Alacant”,“03”,“arrAlacant”],[“Almería”,“04”,“arrAlmeria”], [“Asturias”,“33”,“arrAsturies”], [“Ávila”,“05”,“arrAvila”], [“Badajoz”,“06”,“arrBadajoz”], [“Balears (Illes)”,“07”,“arrBalearsIlles”], [“Barcelona”,“08”,“arrBarcelona”], [“Burgos”,“09”,“arrBurgos”], [“Cáceres”,“10”,“arrCaceres”],

//cities

var arrBarcelona = new Array([“Abrera”,“08001”],[“Aguilar de Segarra”,“08002”],[“Aiguafreda”,“08014”],[“Alella”,“08003”],[“Alpens”,“08004”],[“Ametlla del Vallès (L’)”,“08005”],[“Arenys de Mar”,“08006”],[“Arenys de Munt”,“08007”],[“Argençola”,“08008”],[“Argentona”,“08009”],

In order to resolve the problem, fill province and city, province/city code should be used instead of name. Please take a look over following code snippet.

[C#]

FileStream fs = new FileStream("d:/pdftest/fw5_Source

  • UnFilled (1).pdf", FileMode.Open,
    FileAccess.ReadWrite);<o:p></o:p>

Document pdfDocument = new Document(fs);

string PRESENTADOR_FISICA_CONTACTE_ADRECA_LLISTA_PROVINCIES = @"GSIT_PICA_GRO_SOLLICITUD.presentador.PERSONA_FISICA_O_JURIDICA.PERSONA_FISICA.DADES_IDENTIFICACIO_PARTICULAR.CONTACTE.ADRECA_ESTR.LLISTA_PROVINCIES";

string PRESENTADOR_FISICA_CONTACTE_ADRECA_LLISTA_MUNICIPIS = @"GSIT_PICA_GRO_SOLLICITUD.presentador.PERSONA_FISICA_O_JURIDICA.PERSONA_FISICA.DADES_IDENTIFICACIO_PARTICULAR.CONTACTE.ADRECA_ESTR.LLISTA_MUNICIPIS";

//for requeridor

string PRESENTADOR_FISICA_CONTACTE_ADRECA_LLISTA_PROVINCIES1 = @"GSIT_PICA_GRO_SOLLICITUD.requeridor.PERSONA_FISICA_O_JURIDICA.PERSONA_FISICA.DADES_IDENTIFICACIO_PARTICULAR.CONTACTE.ADRECA_ESTR.LLISTA_PROVINCIES";

string PRESENTADOR_FISICA_CONTACTE_ADRECA_LLISTA_MUNICIPIS1 = @"GSIT_PICA_GRO_SOLLICITUD.requeridor.PERSONA_FISICA_O_JURIDICA.PERSONA_FISICA.DADES_IDENTIFICACIO_PARTICULAR.CONTACTE.ADRECA_ESTR.LLISTA_MUNICIPIS";

// Fill the state

pdfDocument.Form.XFA[PRESENTADOR_FISICA_CONTACTE_ADRECA_LLISTA_PROVINCIES] = "08";//"Barcelona";

// Fill the city

pdfDocument.Form.XFA[PRESENTADOR_FISICA_CONTACTE_ADRECA_LLISTA_MUNICIPIS] = "08003";// "Alella";

// Fill the state

pdfDocument.Form.XFA[PRESENTADOR_FISICA_CONTACTE_ADRECA_LLISTA_PROVINCIES1] = "08";//"Barcelona";

// Fill the city

pdfDocument.Form.XFA[PRESENTADOR_FISICA_CONTACTE_ADRECA_LLISTA_MUNICIPIS1] = "08003";// "Alella";

pdfDocument.Save();

fs.Close();

The issues you have found earlier (filed as PDFNEWNET-34044) have been fixed in Aspose.Pdf for .NET 7.5.0.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.