We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Aspose.PDF 11

Latest build of Aspose.PDF will not populate fields correctly if the names are duplicated.


Example, we have a label form, which has a patient and address information duplicated so that the information prints on 30 labels on a sheet of paper. (3 columns of name/address, 10 rows).

The first row appears to be populated correctly, as does the name on all the existing labels. however the text fields and fields are not correctly populated for the remaining 9 rows.

We also noticed that printing bar-codes (Images of barcodes to be exact) are coming out blurry in this version as well.

I’ve included a pdf, which we use. I will reiterate, that it worked fine with previous versions, and have had to roll back to a prior version in order to correct the issues.


Hi,


Thanks for contacting support.

Can you please share the code snippet which you are using and resultant PDF document generated at your end, so that we can test the scenario in our environment. We are sorry for this inconvenience.

We rolled back the update, and did not save a copy of the printed PDFs which were in error.

So sending a pdf result is not possible.

However, for the code:



We a class we use, here is a snippet of code from it:



public class Form: BaseDocument

{

private PDF.Form _form;

public bool FillField( string fieldName,

string fieldValue )

{

try

{

if( !HasField( fieldName ) )

return false;



_form.FillField( fieldName, fieldValue );

return true;

}

catch( Exception )

{

return false;

}

}

public bool FillForm( IDictionary values )

{

try

{

foreach( KeyValuePair keyValuePair in values )

_form.FillField( keyValuePair.Key, keyValuePair.Value );



_form.FlattenAllFields();

_form.Save( DestinationFileName );



return true;

}

catch( Exception )

{

return false;

}

}

public bool HasField( string fieldName )

{

try

{

return _form != null && _form.FieldNames.Contains( fieldName );

}

catch( Exception )

{

return false;

}

}

}

Hi,

Thanks for sharing the code snippet.

I am working on replicating the issue using this newly shared code but it appears that you have lots of custom defined variables and methods, so the testing is taking a bit longer. Can you please share some sample project, so that we can again try replicating it our environment. We are sorry for this delay and inconvenience.