1

I am getting SafeShell::CommandFailedException: Shell command ["/opt/homebrew/bin/pdftk" error while executing pdftk.fill_form 'public/data.pdf', pdf_name_with_path, data, :flatten => true

Earlier it was working when i was using pdftk, now i just installed java-pdftk using arch -arm64 brew install pdftk-java and it stopped working.

I already updated the pdftk path after installing it.

I am using above in RubyonRails5 and gem pdf-forms

I am using Mac M1(12.3.1)

Chakreshwar Sharma
  • 2,571
  • 1
  • 11
  • 35
  • hi Chakreshwar did you resolve this? I left you a comment on another forum but not sure it triggered an email to you, i hope this one does. thanks for any help with this, exact same problem. – user1130176 May 03 '23 at 14:53

1 Answers1

0

The Problem which I was making here is that I accidently deleted the folder(tmp/pdf) where I was generating the pdf. So, as per this question, the path at pdf_name_with_path was not a valid path. I updated the path and it works.

But yes, the pdftk error was misleading us.

Chakreshwar Sharma
  • 2,571
  • 1
  • 11
  • 35