Converting the Swift Programming Language to PDF

An updated approach.

  1. Go to ~/Library/Containers/
  2. Once there, locate the 881256329 epub folder. You must use a non-beta version of the book. Beta versions are DRM’ed. If your version appears to be DRM’ed (a holdover from the beta period), delete it in iBooks and re-download.
  3. Copy this epub folder to your desktop. Remove the epub extension, zip it, rename to epub. Apple uses a non-standard epub format, and these steps transform the book back to something Calibre can import and convert.
  4. Drag this epub into Calibre.
  5. Click Convert books, choose PDF.
  6. In Page Setup, select default output profile, set margins to 72 on each side
  7. In PDF Output, add printable TOC.
  8. Click OK and let the conversion start


Screen Shot 2015-10-28 at 4.34.56 PM


  • Please note that you may have to delete your local copies and download them again to get DRM-free copies of “The Swift Programming Language (Swift 2.1)” and “Using Swift with Cocoa and Objective-C (Swift 2.1)”.

  • In relation to Swift and PDFs, is it possible to “print” a Playground with markup rendered to a PDF or Postscript file? I could have sworn it used to work fine for me, but lately when I’ve done it, the markup doesn’t show in the PDF.

  • How many total pages is it when converted to PDF?

  • Worked great for creating both PDF and AZW3. Thanks!

  • Incredibly, if you move a beta DRM-protected file to Kindle, it works.

  • Instead of step 5, open epub file and in the bottom left corner you will find a printer icon. Click it and click OK and it will take a few moments to convert then Bob’s is your uncle.

  • Convert book 1 of 1 (881256329)
    Resolved conversion options

    Rest of this very long comment: