You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After opening PdfDocument, I access form fields by:
foreach (AcroFieldBase f in form.Fields)
Then I verify field is Text: f.FieldType == AcroFieldType.Text
f.ToString() loses a bullet character (utf8 "E2 80 A2") and renders it as \u0080 (PAD)
I tried accessing: f.Dictionary.TryGet(NameToken.V, out IToken vToken)
In debugger, I see vToken has 2 private properties:
Data: the text value string
EncodedWith: Iso88591
8859-1 is single byte encoding and that explains the loss.
Is there a way to open the document preserving the utf8 encoding of the text field?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
After opening PdfDocument, I access form fields by:
foreach (AcroFieldBase f in form.Fields)
Then I verify field is Text: f.FieldType == AcroFieldType.Text
f.ToString() loses a bullet character (utf8 "E2 80 A2") and renders it as \u0080 (PAD)
I tried accessing: f.Dictionary.TryGet(NameToken.V, out IToken vToken)
In debugger, I see vToken has 2 private properties:
Data: the text value string
EncodedWith: Iso88591
8859-1 is single byte encoding and that explains the loss.
Is there a way to open the document preserving the utf8 encoding of the text field?
Beta Was this translation helpful? Give feedback.
All reactions