Skip to main content
2 of 5
added 36 characters in body
gatorback
  • 3.2k
  • 8
  • 42
  • 58

Packaging pdftk in App

An attempt to run a third party script on Catalina is described: How to interpret / diagnose pdftk error message

Test results after executing xattr -rd com.apple.quarantine /Users/user/Desktop/bates-label-a-pdf:

user@JUPITER ~ % '/Users/user/Desktop/bates-label-a-pdf/bates-label-a-pdf.app/'../bates-label-a-pdf.sh "/Users/user/Desktop/bates-label-a-pdf/Exhibits_ActivityReport.pdf"; exit
/Users/user/Desktop/bates-label-a-pdf/bates-label-a-pdf.app/../bates-label-a-pdf.sh: line 18: /Users/user/Desktop/bates-label-a-pdf/bates-label-a-pdf.app/../pdftk/bin/pdftk: Bad CPU type in executable
/Users/user/Desktop/bates-label-a-pdf/bates-label-a-pdf.app/../bates-label-a-pdf.sh: line 21: /Users/user/Desktop/bates-label-a-pdf/bates-label-a-pdf.app/../labeling/generate-labeling-pdf: Bad CPU type in executable
/Users/user/Desktop/bates-label-a-pdf/bates-label-a-pdf.app/../bates-label-a-pdf.sh: line 22: /Users/user/Desktop/bates-label-a-pdf/bates-label-a-pdf.app/../pdftk/bin/pdftk: Bad CPU type in executable
mv: /Users/user/Desktop/bates-label-a-pdf/bates-label-a-pdf.app/../labeling/labeling.pdf-compressed: No such file or directory
/Users/user/Desktop/bates-label-a-pdf/bates-label-a-pdf.app/../bates-label-a-pdf.sh: line 26: /Users/user/Desktop/bates-label-a-pdf/bates-label-a-pdf.app/../pdftk/bin/pdftk: Bad CPU type in executable

User mmmmmm commented: The shell scripts need to be put inside the app bundles - as well as the pdftk executable and confirms that pdftk is not in the .app.

The .zip file provided by the thirty party contains pdftk and other labeling functionality:

enter image description here

Is the remedy a simple matter of copying

  1. foo.sh files into the respective foo.app files?
  2. copying labeling and pdftk to a location with bates-label-a-pdf.app? Where exactly?
  3. modifying the .plist?

Contents of bates-label-a-pdf.app enter image description here

If yes, then an example to follow example would be appreciated.

gatorback
  • 3.2k
  • 8
  • 42
  • 58