How to install pdftk on Mac OS X

I want to install pdftk using MacPorts, but this command does not work:

sudo apt-get install pdftk 

Can I install it on a Mac?

My system specifications:

 Processor: 2.5 GHz Intel Core i5 Memory: 8 GB 1600 MHz DDR3 Graphics: Intel HD Graphics 4000 768 MB 
+43
pdftk macos
Dec 27 '13 at 16:48
source share
3 answers

You can use the official installer in PDF Labs.

Edit: Now it is available through homebrew-cask . If you installed this, you can simply run

 brew cask install pdftk 

to install pdftk.

the Cask package is no longer available , so you have to postpone the original solution or follow this workaround

+50
Dec 27 '13 at 16:57
source share

From quantiverge PR to brew:

 brew install https://raw.github.com/quantiverge/homebrew-binary/pdftk/pdftk.rb 
+69
Feb 26 '14 at 21:45
source share

I created pdftk homebrew tap :

 brew tap spl/pdftk brew install pdftk 

the current formula depends on the specific compiler ( gcc48 ) with a special build flag ( enable-all-languages ). This is only a problem if you already have gcc48 without a flag or if you have another version of gcc . You can, of course, clone the formula and modify it for your situation. But, unfortunately, no one answered my question about alternative dependencies , so I don’t know how to resolve this.

Update 1 (2015-03-19) : from this change (described in mine for alternative dependencies ), now the formula supports several versions of gcc and different flags.

Update 2 (2016-01-12) . For users of OS X 10.11 El Capitan, the original pdftk build does not seem to work. There is .pkg . Starting from this date, PDF Labs has not yet released the original update, which fixes the assembly.

+31
Feb 12 '14 at 6:53
source share



All Articles