jkraemer / pdf-forms

Fill out PDF forms with pdftk (http://www.accesspdf.com/pdftk/).
MIT License
287 stars 73 forks source link

PDF with warnings throws an exception #86

Closed Skulli closed 1 year ago

Skulli commented 1 year ago

I have a PDF generated from Word without form fields and doing fill_form throws

SafeShell::CommandFailedException: Shell command ["/opt/homebrew/bin/pdftk", "test.pdf", "fill_form", "/var/folders/z9/9rpgvhwn7t530m5b51097mzw0000gn/T/pdf_forms-fdf20230405-31310-9dq54u", "output", "result.pdf"] failed with status pid 31387 exit 3

even though the result.pdf is successfully generated. If i do the command by hand in the console, i get a warning

Warning: input PDF is not an acroform, so its fields were not filled.

with exit code 3

The thing is, that safe_shell checks if the exit-code is 0. Maybe #83