Learn how to deal with PDF export permission errors while exporting your ebook from Kotobee Author on a Mac OS.

Issue

If you are exporting your ebook as a PDF and receive a user permissions error, this means you do not have the user permissions to execute a library file for PDF generation. This happens, particularly on Mac OS. 

To verify the cause, open the log file (from the Support menu > Show log). By searching, you should find this error in the text:

/bin/sh: /Users/MAC_USERNAME/Library/Application Support/Kotobee Author/plugins/wkhtmltopdfmac/wkhtmltopdfmac: Permission denied

Important: Replace MAC_USERNAME in the above command with your own Mac username.

Solutions

To fix this, you need to provide appropriate permissions for your user account to access this file.  We describe here three ways to change the user permissions:

  • Adding permissions through Finder
  • Adding permissions through Terminal
  • Manually downloading wkhtmltopdfmac

We've ordered them according to simplicity. So, try Finder first, if it doesn't work, then try the Terminal. If both won't work, try manually downloading the file.

Adding permissions through Finder

  1. Navigate to the file:
    /Users/mac_username/Library/Application Support/Kotobee Author/plugins/wkhtmltopdfmac/wkhtmltopdfmac.
    Note: you can show hidden files using the key combination: "Command + Shift + ." or by running the following command in Terminal: defaults write com.apple.finder AppleShowAllFiles TRUE.
  2. CMD+click on the file and select Get Info.
  3. Click the lock button to unlock at the bottom of the Info window. It will prompt you to enter an administrator username and password.

    Permission settings at the bottom of an Info window
  4. Find your username under the Sharing & Permissions list, and set its privilege to Read & Write.
  5. Go back to Kotobee and export the PDF file.

Adding permissions through Terminal

Welcome back. If you're reading this, that means changing the user permissions in Finder didn't work for you. Here's another option: changing permissions in Terminal. We know opening the Terminal for non-techies can be scary, but don't worry it's actually quite simple. And if it works, at the end you'll get quite the techie rush.

  1. From Finder, navigate to the folder /Users/mac_username/Library/Application Support/Kotobee Author/plugins/wkhtmltopdfmac.
    Important: Replace mac_username with your own mac username
  2. CMD+click on the folder and select New Terminal at Folder. If you don't see it, check the Services submenu.
  3. Once Terminal has started, copy-paste the following and hit Enter.
    chmod 777 wkhtmltopdfmac
  4. Go back to Kotobee and export the PDF file.

Downloading wkhtmltopdf manually

If both of the above solutions failed, then we've reached our last resort: to download the wkhtmltopdf library manually. It's the most complex solution, but it's also fail-proof. So, let's do it.

  1. Go to https://wkhtmltopdf.org/downloads.html
  2. Download the appropriate version for your OS.
  3. Open the file, and follow the instructions to install it.
  4. Type Terminal in Spotlight to open the terminal window.
  5. Find the folder where wkhtmltopdf was installed by copy-pasting the following and hitting Enter.
    which wkhtmltopdf
  6. Note the path that appears in the result. ie. path/where/idownloaded/wkhtmltopdf.
  7. Make a copy of wkhtmltopdf to the folder Kotobee uses.
    Type in the following line of code with the path from the previous step and your username. Then hit Enter.
    cp "path/from/previous/step/wkhtmltopdf" "/Users/mac_username/Library/Application Support/Kotobee Author/plugins/wkhtmltopdfmac/wkhtmltopdfmac"

    *Remember to replace path/from/previous/step/ with the actual path you got from the previous step.
    And replace mac_username with your own Mac username.
    Explanation of code: cp for copy, then in quotation marks the "file and its current location" then in quotation marks "where you want the file and its new name".

  8. Go back to Kotobee and export the PDF file.

Now, if for any crazy reason it still didn't work, open the live chat below, submit a support ticket above, or click on "I need help!" in Kotobee Author.

Hey, even if it worked like it should, open the chat and tell us about it. We love hearing from you and chatting with you.