You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Laurent BERTEAU (Jira)" <ji...@apache.org> on 2020/12/28 16:48:00 UTC

[jira] [Created] (PDFBOX-5060) AcroForm PDTextField formatting lost when setting value

Laurent BERTEAU created PDFBOX-5060:
---------------------------------------

             Summary: AcroForm PDTextField formatting lost when setting value
                 Key: PDFBOX-5060
                 URL: https://issues.apache.org/jira/browse/PDFBOX-5060
             Project: PDFBox
          Issue Type: Bug
          Components: AcroForm
    Affects Versions: 2.0.22
            Reporter: Laurent BERTEAU


Formatted value of a form text field with assigned format action is lost in org.apache.pdfbox.pdmodel.interactive.form.AppearanceGeneratorHelper.setAppearanceValue(String apValue) method.

Formatted value is processed with first method line :

{{this.value = this.getFormattedValue(apValue);}}

 

But then if the field is of PDTextFieldType, formatted value stored in this.value is replaced with :

{{this.value = apValue.replaceAll}}

 Shoud instead be : 

{{this.value = this.value.replaceAll}}

 to preserve previously processed formatted value.

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org