Skip to content

Commit ef0ed2e

Browse files
committed
Fix Fields coercement
1 parent a29f672 commit ef0ed2e

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

lib/PDF/Action/SubmitForm.rakumod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ my subset FieldRef where PDF::Field|PDF::COS::TextString;
3434
multi sub coerce-field-ref(Hash $fld, FieldRef) { coerce-field($fld, PDF::Field) }
3535
multi sub coerce-field-ref(Str $value is rw, FieldRef) { $value = PDF::COS::TextString.COERCE($value) }
3636
multi sub coerce-field-ref($_, $) { warn "unable to coerce to field reference: {.raku}"; }
37-
has FieldRef @.Fields is entry(:coerce(&coerce-field)); #= (Optional) An array identifying which fields to include in the submission or which to exclude, depending on the setting of the Include/Exclude flag in the Flags entry. Each element of the array is either an indirect reference to a field dictionary or (PDF 1.3) a text string representing the fully qualified name of a field. Elements of both kinds may be mixed in the same array.
37+
has FieldRef @.Fields is entry(:coerce(&coerce-field-ref)); #= (Optional) An array identifying which fields to include in the submission or which to exclude, depending on the setting of the Include/Exclude flag in the Flags entry. Each element of the array is either an indirect reference to a field dictionary or (PDF 1.3) a text string representing the fully qualified name of a field. Elements of both kinds may be mixed in the same array.
3838

3939
=para If this entry is omitted, the Include/Exclude flag is ignored, and all fields in the document’s interactive form is submitted except those whose NoExport flag is set. Fields with no values may also be excluded, as dictated by the value of the IncludeNoValueFields flag.
4040

lib/PDF/Field.rakumod

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,6 @@ multi sub coerce-field(PDF::COS::Dict() $dict, PDF::Field $field) is export(:coe
6363
my PDF::Field:U $class = $field.field-delegate( $dict );
6464
$class.COERCE: $dict;
6565
}
66-
method coerce-field(Hash $dict) {
67-
coerce-field($dict, PDF::Field);
68-
}
6966

7067
method type { 'Field' }
7168
has FieldSubtypeName $.FT is entry(:inherit, :alias<subtype>); # Required for terminal fields; inheritable) The type of field that this dictionary describes

0 commit comments

Comments
 (0)