Originally Posted by Manichean
There's no single regex that can eliminate all headers and footers during conversion. If there were, it would be hardcoded somewhere instead of having the user writing the regex.
Calibre also has a handy, (and free!), tool for PDF cropping within the command line function PDFManipulate.
See the crop option in pdfmanipulate for more details and https://www.mobileread.com/forums/sho...d.php?t=103437
for an example of using it.