Search code examples
macosactionscript-3homebrewpdf2swf

pdf2swf not installed through Homebrew – but the rest of swftools are


Environment OSX 10.9.5

I am trying to install swftools so that I can use pdf2swf. I am installing through HomeBrew. I've seen various notes about pdf2swf failing to install if its dependencies have not been previously installed. So using the command at the link I use:

$ brew install freetype libjpeg giflib swftools

And it completes without error – except pdf2swf is not installed. When I look in usr/local/bin, I see the other swftools are installed successfully.

Does anyone know what might be wrong?

Update: For completeness if anyone comes across this question looking to use pdf2swf in an AIR desktop app: you can't. Apparently pdf2swf compiles the swf with certain "AllowDomain" security settings and there is no option to not do that. Short of editing the source code and compiling pdf2swf oneself, it seems a deadend.


Solution

  • If you look at the brew formula: brew edit swftools, PDF support comes via xpdf and this is not included by default as XQuartz needs to be installed:

    brew instal swftools --with-xpdf
    swftools: XQuartz is required to install this formula.
    You can install with Homebrew Cask:
      brew install Caskroom/cask/xquartz
    
    You can download from:
      https://xquartz.macosforge.org
    Error: An unsatisfied requirement failed this build.
    

    So:

    • Install XQuartz
    • brew install swftools --with-xpdf