Ruby gem origami sign signature failed

312 views Asked by At

I'm trying to make the PDF file with signature with origami gem, follow this example https://github.com/gdelugre/origami/blob/master/examples/signature/signature.rb

Now i just run this signature.rb and got error

[error] Breaking on: ">>\nendobj\n..." at offset 0x1f6f3

[error] Last exception: [Origami::InvalidObjectError] Failed to parse object (no:43,gen:0) -> [ArgumentError] wrong number of arguments (given 1, expected 0; required keyword: year)

I have no idea to move forward :'<

I also found the sign method of gem at https://github.com/gdelugre/origami/blob/master/lib/origami/signature.rb, and have take a look, I can't find any specific things to do :'<

Might this example is outdate?

1

There are 1 answers

1
K J On BEST ANSWER

The error message is known see https://github.com/gdelugre/origami/issues/80

A fix should be available https://github.com/gdelugre/origami/pull/74/commits

But has not been added so use newer file from the fork https://github.com/pocke/origami/tree/fix-ruby-2.7-kwargs-warnings

Specifically you need this updated file and may need to follow any other suggestions from above.

https://github.com/pocke/origami/raw/fix-ruby-2.7-kwargs-warnings/lib/origami/filters/predictors.rb

However it always worth looking for a fork with many more recent improvements such as

https://github.com/joelsondrew/origami