This repository has been archived by the owner. It is now read-only.

Take pages screenshots for a Baker book

Simbul edited this page Nov 8, 2012 · 10 revisions

The easiest way to create screenshots for your book when you have the -baker-rendering flag set to screenshots is to let Baker Framework and iOS Simulator do the dirty work for you. Here's how the trick is done:

  1. Download the latest version of Baker Framework and put all your book files in the book folder
  2. Start Xcode and run your application with iOS Simulator
  3. As soon as the first page is loaded check the debug area for the log Screenshot succesfully saved to file /Users/username/Library/Application Support/iPhone Simulator/simulator version/Applications/application identifier/Library/Private Documents/baker-screenshots/screenshot-portrait-1.jpg and note down the path to the application Documents folder (it will be different in your case)
  4. Navigate through ALL the pages in ALL the orientations supported by your book to let Baker take all the screenshots needed
  5. Open Finder --> Go --> Go to Folder... (cmd+shift+g) and type in the path to your application Documents folder (see 3)
  6. Copy the folder baker-screenshots and paste it inside your book folder and, if you want, rename it as you see fit
  7. Set the property -baker-page-screenshots in your book.json to the name of your screenshot folder (see the page on Baker extension parameters for more info)

That's it, now you have all the screenshots you need.
Delete your app from the simulator and run it again in Xcode. You should see that screenshots aren't taken at runtime anymore: the ones in the folder you specified are being used instead.

Note: If you specify a folder for pre-generated screenshots (using -baker-page-screenshots), Baker will use the screenshots, but it will not generate any new one. So make sure the folder contains ALL the screenshots you need in your book, otherwise some will be missing.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.