jobou363

TextArea show text on one line

0 votes
I'm wondering how I can make the text area name "Commentaire" in the pdf filled correctly. The text in the document does not appear correctly and is always on one line. I'm using a code similar to this : var documentBuilder = DocumentBuilder.NewDocumentNamed("Formulaire d'adhésion") .FromStream(pdfFileStream, DocumentType.PDF) .WithExtractionType(ExtractionType.ACROFIELDS) .EnableExtraction() .WithInjectedField(FieldBuilder.TextArea().WithName("Commentaire").WithValidation(fieldValidatorString).WithValue(comments));

Reply to: TextArea show text on one line

0 votes
Hi jobou363, Cause you were using Field Injection Feature, it only works with text fields which show text on one line, so this is somehow expected with this combination. I will confirm this for you tomorrow. Without confirmation, I would suggest that (1)you use a text area field directly and set the data you got beforehand as the default value, and the field was binded to your signer. But the defect of this is your signer can change the value when signing. (2)if you are sensitive to the defect of point 1, to overcome it, you can have an invisible signature for your package owner, and bind the text area to him/her, before any party actually started to sign, your application can programmatically sign the document so that the text would be injected to document. Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: TextArea show text on one line

0 votes
Ok, i found a solution on my end by validatiing and formating the input to be wrapped and of a specific size and it's work now. I have by example set some limit to the comment html area on my web page that is use to fill the text field in pdf. @rows = "6", @cols = 70 , @maxlength=400, @wrap="hard"

Reply to: TextArea show text on one line

0 votes

 

Hi Team,

 

Even i created  invisible signature for your package owner, Textarea is no wrap, meaning TextArea show text on one line

I am using a  below code

.withSignature(SignatureBuilder .signatureFor(sender) .atPosition(0, 0).withSize(0,0) .withField(FieldBuilder.textArea().withName("text") .withSize(250,200).atPosition(0,700) .withValue("By providing my e-signature below, I hereby certify this document to be a true and complete copy of the original as sighted by me")));


Reply to:

0 votes

Hi elavarasan097,

 

Great to hear from you!

Not sure how your code is different from mine, but below code seems gives me the expected output:

        EslClient eslClient = new EslClient(API_KEY, API_URL);
        
        DocumentPackage pkg = PackageBuilder.newPackageNamed("Sample Package")
                .withSigner(SignerBuilder.newSignerWithEmail("your_sender_email")
                    .withFirstName("duo")
                    .withLastName("liang"))
                .withDocument(DocumentBuilder.newDocumentWithName("Document1")
                    .fromFile("path_to_doc")
                    .withId("Document1")
                    .withSignature(SignatureBuilder.signatureFor("your_sender_email") 
                            .atPosition(1,1)                                     //seems I can no longer set position as (0,0)
                            .withSize(0,0) 
                            .withField(FieldBuilder.textArea()
                                    .withName("text") 
                                    .withSize(250,200)
                                    .atPosition(0,700) 
                                    .withValue("By providing my e-signature below, I hereby certify this document to be a true and complete copy of the original as sighted by me")
                                    )
                            )
                )
                .withStatus(PackageStatus.SENT)
                .build();
        PackageId packageId = eslClient.createPackageOneStep(pkg);       
        eslClient.signDocuments(packageId);

 

And the document after signing looks like this:
11-12-3

 

Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off