View Single Post
Old 01-07-2011, 03:10 AM   #4
toddos
Guru
toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.
 
toddos's Avatar
 
Posts: 694
Karma: 822675
Join Date: May 2010
Device: Kobo Aura, Nokia Lumia 920 (Freda)
It's in the conversion dialog
  1. Select the book you want to convert
  2. Open the conversion dialog (shortcut: c)
  3. Make sure the Input format in the top left is PDF (this should be the case unless you have other formats attached the to book already)
  4. Click on Structure Detection

From here you have "Remove Header" and "Remove Footer" options. They are pre-populated by default with a regular expression that probably won't work for you. For best results, you'll have to figure out the correct regular expressions on your own. This is where the test mode (the wand-looking buttons to the right of the regular expression text fields) is extremely useful. Google for a python regular expression reference and then build the expression you need to remove the headers and footers from your book. Just remember to check the checkboxes when you're done before you start the conversion. Also, it's probably a good idea to use the "preprocess input file" option as that can make building your regular expressions easier (it's not going to do it for you, but by preprocessing the contents of what you're running the expressions over should be more uniform).
toddos is offline   Reply With Quote