Originally Posted by Manichean
There's no single regex that can eliminate all headers and footers during conversion. .
your alternative is to use tools within PDf software that can crop pages/ remove headers. the Adobe one is very expensive but PDF-xchange is cheap* & lets you crop + also delete any unwanted pages. I do that before adding to calibre.
once again it needs manual intervention though - you have to tell the program where to crop.
I prefer the crop solution to the regex solution as it is easier to see what it is doing;
plus the less work that calibre has to do, the faster the pdf convert should be.
*pdf xchange lite is currently free for home / academic use. http://www.tracker-software.com/free_lite_home.html
but for cropping you need the pro version - unless you can get all of your books cropped before the free evaluation period times out !!!