Learn how to install different packages on your Mac to create PDF files.
Before You Import Your PDF file
Due to the complexity of Mac compilation, there are a few manual steps that you may need to 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, then 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.
- Enter your Mac user password if it asks you for a password.
- Wait for the command to finish.
- 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.