How to install pdftk on Mac OS X [closed]

北慕城南 提交于 2019-12-03 00:45:55

问题


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

 sudo apt-get install pdftk

Is it possible to install it on a Mac?

My system specifications are:

Processor: 2.5 GHz Intel Core i5
Memory:    8 GB 1600 MHz DDR3
Graphics:  Intel HD Graphics 4000 768 MB

回答1:


You can use the official installer from PDF Labs.

Edit: It’s now available through homebrew-cask too. If you have that installed, you can just run

brew cask install pdftk

to install pdftk.

There is no longer a Cask package available, so you will have to defer to the original solution or follow this workaround




回答2:


From quantiverge PR on brew:

brew install https://raw.github.com/quantiverge/homebrew-binary/pdftk/pdftk.rb



回答3:


I created a pdftk homebrew tap:

brew tap spl/pdftk
brew install pdftk

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

Update 1 (2015-03-19): As of this change (described in my solution to alternative dependencies), the formula now supports multiple versions of gcc and different flags.

Update 2 (2016-01-12): For OS X 10.11 El Capitan users, the source build of pdftk does not seem to work. There is a .pkg available at https://stackoverflow.com/a/33248310/545794 . As of this date, PDF Labs has not yet released a source update that fixes the build.



来源:https://stackoverflow.com/questions/20804441/how-to-install-pdftk-on-mac-os-x

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!