Free Support Forum - aspose.com

Aspose.Pdf FillField Problems

Hello,


We are having some problems when we try to fill the PDF with some values.
The PDF is formated, but when we use the FlattenFields and save the format is not preserved.

The source is: Selbetti-pg1-new.pdf
The output result is: outputPg1.pdf

Aspose.Pdf.Facades.Form formPg1 = new Form(Server.MapPath(“Selbetti-pg1-new.pdf”), Server.MapPath(“outputPg1.pdf”));
StreamReader sr = new StreamReader(Server.MapPath(“campoValorPg1.txt”));
string conteudo = sr.ReadToEnd();
sr.Close();
foreach (string str in conteudo.Split(’;’))
{
string[] campoValor = str.Split(’#’);
try
{
formPg1.FillField(campoValor[0], campoValor[1]);
}
catch
{

}
}
formPg1.FlattenAllFields();
formPg1.Save();

Thanks.

Hello Alexandre,

Thanks for using our products.

Can you please share some details regarding the issue related to formatting being lost when using FlattenAllFields(…) method. As per my observations, I am unable to notice any issue when using FlattenAllFields(…) method and without using it.

Besides this, I have observed that when using FlattenAllFields(…) method and viewing the resultant PDF document in Adobe Reader X, an error message is being displayed. For the sake of correction, I have logged it as PDFNEWNET-29920 in our issue tracking system. We will further look into the details of this problem and will keep you posted on the status of correction. We apologize for your inconvenience.

Hello,

Please open the file outputPg1.pdf, observe the field below "INFORMAÇÕES COMPLEMENTARES".
In the source PDF the size of field is 6, the same of the other fields.

This value "Consulta de autenticidade no portal nacional
NF-e www.nfe.fazenda.gov.br/portal ou no sit
e da Sefaz Autorizadora" should be size 8.

Thanks.

Hello Alexandre,

Thanks for sharing the details.

I have again tested the scenario and I am able to notice same problems. For the sake of correction, I have logged it separately as PDFNEWNET-29924 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. We apologize for your inconvenience.

The issues you have found earlier (filed as 29920) have been fixed in this update.


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

The issues you have found earlier (filed as 29924 ) have been fixed in this update.


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