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.

  1. Open the Terminal window: Press Command+Space and type Terminal and press enter/return key.
  2. Run the following in the Terminal window:
    which brew 

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.

Install Homebrew

In case brew isn't installed:

  1. 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/null
     and press enter/return key. 
  2. Enter your Mac user password if it asks you for a password.
  3. Wait for the command to finish.
  4. Run the following:
brew install bash

Depending on your import mode of choice, you will need extra packages.  

Read more about the  3 different modes for import: Editable Content Mode, Accurate & Selectable Mode, and Plain Text.

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 pdf2htmle

If you contrinue to receive errors, run the following two commands:

brew install readline
brew reinstall fontforge

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-tools
If 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 xpdf

You may now create your PDF files, then import them.

Further reading:

Import a PDF file with Editable Text

Import a PDF File with Accurate and Selectable Text

Import a PDF file as Plain Text