<table><tr><td style="">aacid added inline comments.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D13172">View Revision</a></tr></table><br /><div><strong>INLINE COMMENTS</strong><div><div style="margin: 6px 0 12px 0;"><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D13172#inline-71638">View Inline</a><span style="color: #4b4d51; font-weight: bold;">aheinecke</span> wrote in <span style="color: #4b4d51; font-weight: bold;">builtin.js:99</span></div>
<div style="margin: 8px 0; padding: 0 12px; color: #74777D;"><p style="padding: 0; margin: 8px;">Acrobat saves the "internal text" as the annotation value and the formatted text in the "object"</p>
<p style="padding: 0; margin: 8px;">To clarify (As I don't really know what the "object" is properly called):</p>
<p style="padding: 0; margin: 8px;">If I enter "1234.56444" in a field that formats it as "$ 1,234.56" I find the following in the pdf:</p>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);"><</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</pre></div>
<p style="padding: 0; margin: 8px;">And:</p>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);"><<
/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)
>></pre></div>
<p style="padding: 0; margin: 8px;">Which leads to this behavior (which is IMO Ok) in okular:</p>
<p style="padding: 0; margin: 8px;"><a href="https://phabricator.kde.org/F5931466" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;">F5931466: okular-saved-formatted.gif</a></p>
<p style="padding: 0; margin: 8px;">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>
<p style="padding: 0; margin: 8px;">P.S. Here is the document as saved by Acrobat DC: <a href="https://phabricator.kde.org/F5931482" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;">F5931482: FieldFormat_filled.pdf</a></p></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">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?</p></div></div></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R223 Okular</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D13172">https://phabricator.kde.org/D13172</a></div></div><br /><div><strong>To: </strong>aheinecke, aacid<br /><strong>Cc: </strong>okular-devel, ngraham, aacid<br /></div>