D13172: Add AFNumber_Format and l10n AFSimple_Calculate
Albert Astals Cid
noreply at phabricator.kde.org
Tue Jun 26 13:23:55 UTC 2018
aacid added inline comments.
INLINE COMMENTS
> aheinecke wrote in builtin.js:99
> Acrobat saves the "internal text" as the annotation value and the formatted text in the "object"
>
> To clarify (As I don't really know what the "object" is properly called):
>
> If I enter "1234.56444" in a field that formats it as "$ 1,234.56" I find the following in the pdf:
>
> <</BBox [ 0 0 134.042 17.2125 ]/FormType 1/Length 111/Matrix [ 1 0 0 1 0 0 ]/Resources <</Font <</Helv 36 0 R>>/ProcSet [ /PDF /Text ]>>/Subtype /Form/Type /XObject>>stream
> /Tx BMC
> q
> 1 1 132.0416 15.2125 re
> W
> n
> BT
> /Helv 12 Tf
> 0 g
> 2 4.155 Td
> ($ ) Tj
> 9.996 0 Td
> (1,234.56) Tj
> ET
> Q
> EMC
>
> endstream
> endobj
>
> And:
>
> <<
> /AA <<
> /F 55 0 R
> /K 56 0 R
> >>
> /AP <<
> /N 76 0 R
> >>
> /DA (/Helv 12 Tf 0 g)
> /F 4
> /FT /Tx
> /MK <<
> >>
> /P 15 0 R
> /Rect [ 121.683 763.617 255.724 780.829 ]
> /Subtype /Widget
> /T (us_currency_fmt)
> /Type /Annot
> /V (1234.56444)
> >>
>
> Which leads to this behavior (which is IMO Ok) in okular:
>
> F5931466: okular-saved-formatted.gif <https://phabricator.kde.org/F5931466>
>
> I don't think that there is API in poppler to set the fields text to a different value then the value of the annotation. My preference would be to say for now that the behavior of save/load is not perfect but it's usable. A user will probably be annoyed once but afterwards have learned how it behaves.
>
> P.S. Here is the document as saved by Acrobat DC: F5931482: FieldFormat_filled.pdf <https://phabricator.kde.org/F5931482>
I see, Adobe saves on the appearance stream the "visual" representation rounded and with the dollar while in the actual annotation saves the "real" value, with this patch, what do we do? Save the "visual" representation in both?
REPOSITORY
R223 Okular
REVISION DETAIL
https://phabricator.kde.org/D13172
To: aheinecke, aacid
Cc: okular-devel, ngraham, aacid
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20180626/acbb7152/attachment.html>
More information about the Okular-devel
mailing list