1

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 application bundle bates-label-a-pdf.app: enter image description here

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

3
  • In essence yes see Bundle Programming Guide fior overview of where things go. See also apple.stackexchange.com/questions/224394/… I don't know about droplets
    – mmmmmm
    Commented Nov 24, 2021 at 14:08
  • The main.scpt in the bates-label-a-pdf.app application bundle and the bates-label-a-pdf.sh are editable and as such just make the appropriate edits if you want to include the labeling and pdftk folders and the bates-label-a-pdf.sh script within the Resources folder of the bates-label-a-pdf.app application bundle. Commented Nov 24, 2021 at 15:28
  • 1
    BTW The pdftk and generate-labeling-pdf executables are Mach-O executable i386 and therefore will not run under macOS Catalina. They need to be Mach-O 64-bit executable x86_64 to run under macOS Catalina. Commented Nov 24, 2021 at 16:52

0

You must log in to answer this question.

Browse other questions tagged .