Thread: Remove Footer
View Single Post
Old 03-12-2010, 01:08 AM   #40
kristarella
Junior Member
kristarella began at the beginning.
 
kristarella's Avatar
 
Posts: 3
Karma: 10
Join Date: Mar 2010
Device: iPhone
Quote:
Originally Posted by matthias View Post
i know i'm repeating myself, but i converted last week (with calibre 0.6.43) to convert several PDF-Files with pagenumbers in all the different ways there are. For most of them, the following Regex worked:
(i know it won't be highlighted in the wizard, but when you convert it, you will notice that it works anyway)

Code:
(<p>\s*\d+\s*<p>)
this regex will remove every pagenumber that stands by itself in a row.

if there is something like "Page 3" (having the html-Syntax of "<p>Page 3 </p>", you have to adjust your regex, too:

Code:
(<p>Page\s*\d+\s*<p>)
If it's becoming more difficult, you can use the wizard to verify your results, but in general you have to replace the closing tag with a "normal" to get it to work with in the conversion.
Thanks matthias, I will bookmark this and give it a go next time. I usually try to do more than page numbers, I do headers with book and chapter names (usually have some formatting that differentiates them from other text) and sometimes document name/date header/footers. It's hard to know if you're nuking them without the highlighting. Will try though.
kristarella is offline   Reply With Quote