Learn how to install on your Mac different packages to create better PDF files.
Before You Import Your PDF file
Due to the complexity of Mac compilation, there are a few manual steps that you may to need go through before importing your PDF.
The instructions provided below are for Homebrew, a package manager designed for installing tools on Mac OS X. Note that installing packages on Mac may take a good number of minutes to complete, so be patient!
Check for Homebrew
First find out whether Homebrew is already installed on your system.
- Open the Terminal window: Press Command+Space and type Terminal and press enter/return key.
- Run the following in the Terminal window:
If Homebrew is installed, it will show you the path of installation.
Otherwise, it will tell you "command not found". If brew isn't installed, you will need to install it.
- In case brew isn't installed, run the following in the Terminal window to install it:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/nulland press enter/return key.
- It may ask you for a password. Simply enter your Mac user password.
- Wait for the command to finish.
- Then, run the following:
brew install bash
Depending on your import mode of choice, you will need extra packages.
Editable Content Mode
A package named pdf2htmlex is required. Simply run the following in the Terminal window:
brew install pdf2htmlex
If you receive an error about conflicting formulae, try the reinstall command instead of install:
brew reinstall pdf2htmlex
Accurate & selectable mode
To generate image scans of your PDF, a package named mutools is required. Simply run the following in the Terminal window:
brew install mupdf-toolsIf you will enable the text to be selectable by your readers in your final product, then you also need to make sure you have pdf2htmlex installed (see the previous section Editable Content Mode).
Plain text mode
A package named xpdf is required to be installed. Simply run the following in the Terminal window:
brew install homebrew/x11/xpdf
You may now create your PDF files, then import them.