Closed rebelcolony closed 1 year ago
You need to enclose the hash in curly brackets (see https://hexapdf.gettalong.org/documentation/reference/api/HexaPDF/Document/index.html#method-i-add) since the value is a positional argument:
doc = HexaPDF::Document.open(path_to_file)
form = doc.add({Type: :XObject, Subtype: :Form, BBox: HexaPDF::Type::Page.media_box(:A4)})
doc = HexaPDF::Document.open(path_to_file) form = doc.add(Type: :XObject, Subtype: :Form, BBox: HexaPDF::Type::Page.media_box(:A4))
ArgumentError (wrong number of arguments (given 0, expected 1) rails 6.1.7 ruby 3.1.3 Mac M1