mirror of
https://github.com/unidoc/unipdf.git
synced 2025-04-27 13:48:51 +08:00
Make T field optional on PDF field dictionary parse
This commit is contained in:
parent
3b2c788c32
commit
e1c918631a
@ -574,13 +574,8 @@ func (r *PdfReader) newPdfFieldFromIndirectObject(container *core.PdfIndirectObj
|
||||
// attributes for descendant terminal fields. Does not logically have a type of its own.
|
||||
// Terminal field: An actual field with a type.
|
||||
|
||||
// Partial field name (Required)
|
||||
if s, has := d.Get("T").(*core.PdfObjectString); has {
|
||||
field.T = s
|
||||
} else {
|
||||
common.Log.Debug("Invalid - T field missing (required)")
|
||||
return nil, ErrTypeCheck
|
||||
}
|
||||
// Partial field name.
|
||||
field.T, _ = d.Get("T").(*core.PdfObjectString)
|
||||
|
||||
// Alternate description (Optional)
|
||||
field.TU, _ = d.Get("TU").(*core.PdfObjectString)
|
||||
|
Loading…
x
Reference in New Issue
Block a user