Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 02-11-2011, 10:48 AM   #1
RachDvn
Member
RachDvn has a complete set of Star Wars action figures.RachDvn has a complete set of Star Wars action figures.RachDvn has a complete set of Star Wars action figures.RachDvn has a complete set of Star Wars action figures.
 
RachDvn's Avatar
 
Posts: 24
Karma: 322
Join Date: Jan 2011
Device: Kindle
Simply remove ALL headers/footers?

I've read the guides (a few times ) about the new Search & Replace feature, but sadly, I'm not grasping. I never used the header/footer feature in previous Calibre editions either, so this element is brand new for me. I also know that PDF conversions are riddled with problems.

That said, is there a Regex that can simply remove all headers and footers when doing a PDF to mobi conversion? Don't want to replace anything, just make them all disappear. Any possible way?

Thanks,
Rach
RachDvn is offline   Reply With Quote
Old 02-11-2011, 11:25 AM   #2
carnivore
Member
carnivore began at the beginning.
 
Posts: 12
Karma: 42
Join Date: Jan 2011
Device: Kindle 3
If you just leave the 'replace' section blank, it will remove the matched text.

The regex that you need depends on what's in your PDF. Pulling page numbers is different than removing path information.

Since the stuff you want to get rid of is usually on one line, you can use pretty simple regexes like:
Code:
file:///.+
to match
Code:
file:///F|/rah/Author%20D.%20Writerperson%20Title%20Book.txt (1 of 105) [1/14/03 10:48:52 PM]<br>
and
Code:
file:///F|/rah/Author%20D.%20Writerperson%20Title%20Book.txt<br>
carnivore is offline   Reply With Quote
Old 02-11-2011, 11:45 AM   #3
Manichean
Wizard
Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!
 
Manichean's Avatar
 
Posts: 3,130
Karma: 80520
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
Quote:
Originally Posted by RachDvn View Post
That said, is there a Regex that can simply remove all headers and footers when doing a PDF to mobi conversion? Don't want to replace anything, just make them all disappear. Any possible way?
The search & replace- feature is an abstraction of the previous header/footer removal feature. It just allows you to specify the replacement text, if you don't specify any, you delete the items.
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.
Manichean is offline   Reply With Quote
Old 02-12-2011, 10:56 AM   #4
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 2,984
Karma: 1285294
Join Date: Sep 2010
Device: Kobo aura HD, Kobo Arc, Kindle Fire HDX 8.9 , Kindle for PC
Quote:
Originally Posted by Manichean View Post
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 !!!

Last edited by cybmole; 02-12-2011 at 11:08 AM.
cybmole is offline   Reply With Quote
Old 02-12-2011, 03:08 PM   #5
Agama
Guru
Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.
 
Agama's Avatar
 
Posts: 667
Karma: 436517
Join Date: Jul 2010
Location: UK
Device: PRS-300 (R.I.P.), PW2, Nexus7
Quote:
Originally Posted by Manichean View Post
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 http://www.mobileread.com/forums/sho...d.php?t=103437 for an example of using it.
Agama is offline   Reply With Quote
Old 02-17-2011, 05:36 AM   #6
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 2,984
Karma: 1285294
Join Date: Sep 2010
Device: Kobo aura HD, Kobo Arc, Kindle Fire HDX 8.9 , Kindle for PC
NB some PDF viewer crop options do not actually remove anything - I found out the hard way but trying to convert "cropped" output from pdf -x change.

all that crop does is hides the parts of the page you tell it to. when the PDF is uses as input to calibre convert it reads the whole page, including the stuff you thought you'd cropped out of existence!

so thats a point in favour of regex solutions
cybmole is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Removing Headers/Footers Help? Anarel Workshop 10 11-09-2010 01:53 PM
Remove Headers & Footers Mamaijee Introduce Yourself 8 09-26-2010 02:05 PM
Pls help with removing headers /footers Mamaijee Calibre 0 09-19-2010 02:29 PM
EPUB Headers & Footers? Hamlet53 ePub 11 04-23-2010 09:41 PM
page headers/footers daesdaemar Workshop 20 12-12-2008 10:22 PM


All times are GMT -4. The time now is 11:54 AM.


MobileRead.com is a privately owned, operated and funded community.