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

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 02-06-2018, 05:52 AM   #16
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,661
Karma: 127838196
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
If you are converting to PDF, there may be a better way to do it. Take your source and convert to HTMLZ. UnZIP the contents on the .htmlz (you can rename to .zip if that helps) and load the HTML into Word or some other word processor. Clean it up there and then save as PDF.

Last edited by JSWolf; 02-06-2018 at 06:07 AM.
JSWolf is online now   Reply With Quote
Old 02-06-2018, 05:53 AM   #17
mzso
Enthusiast
mzso began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Feb 2018
Device: PC
Quote:
Originally Posted by HarryT View Post
It's a book coding question, though, not a conversion question.
Well, the header options are in the converter settings in the pdf output section.
Attached Thumbnails
Click image for larger version

Name:	calibre-pdf-header.png
Views:	271
Size:	53.6 KB
ID:	162109  

Last edited by issybird; 02-06-2018 at 01:00 PM. Reason: Thumbnail suffices.
mzso is offline   Reply With Quote
Advert
Old 02-06-2018, 05:55 AM   #18
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Fair enough, but it's the code that matters, not the place where it's used, and this is the correct forum to discuss coding issues.
HarryT is offline   Reply With Quote
Old 02-06-2018, 05:57 AM   #19
mzso
Enthusiast
mzso began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Feb 2018
Device: PC
Quote:
Originally Posted by JSWolf View Post
If you are converting to ePub, there may be a better way to do it. Take your source and convert to HTMLZ. UnZIP the contents on the .htmlz (you can rename to .zip if that helps) and load the HTML into Word or some other word processor. Clean it up there and then save as PDF.
I'm converting to PDF as I said. But I guess you misspoke.

It doesn't seem better to me. I'd replace a one step process with a convoluted 4-5 step process, which I need to do by hand (if I can) instead of Calibre doing it for me automatically.
So If this could be done properly with the code in the header field I could use it for all (or at least many) books in bulk.

Quote:
Originally Posted by HarryT View Post
Fair enough, but it's the code that matters, not the place where it's used, and this is the correct forum to discuss coding issues.
If you say so, but it might be a calibre issue that all my attempts failed while using css in the header field.

Last edited by mzso; 02-06-2018 at 06:01 AM.
mzso is offline   Reply With Quote
Old 02-06-2018, 06:03 AM   #20
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Try putting the same code that you're using in the conversion options into the book itself, and see what happens then. That will tell you whether the issue lies in the code or the conversion process. Ie add a dummy heading somewhere in the book using that code, and see how it displays.

Last edited by HarryT; 02-06-2018 at 06:09 AM.
HarryT is offline   Reply With Quote
Advert
Old 02-06-2018, 06:10 AM   #21
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,661
Karma: 127838196
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by mzso View Post
I'm converting to PDF as I said. But I guess you misspoke.
I misstyped. I did mean to put PDF and not ePub. But my directions are still very valid.

Quote:
It doesn't seem better to me. I'd replace a one step process with a convoluted 4-5 step process, which I need to do by hand (if I can) instead of Calibre doing it for me automatically.
So If this could be done properly with the code in the header field I could use it for all (or at least many) books in bulk.
Sometimes a one-step process in't always the best. With this directions I gave you, you'll have more control over the conversion.
JSWolf is online now   Reply With Quote
Old 02-06-2018, 07:44 AM   #22
mzso
Enthusiast
mzso began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Feb 2018
Device: PC
@JSWolf @HarryT

I only wanted a measly line at the bottom of the header using the pdf output options. That's what I need help with.

And not waste days converting between different other formats, hand editing documents and experimenting, per book.
mzso is offline   Reply With Quote
Old 02-06-2018, 11:47 AM   #23
Nicolas F
Groupie
Nicolas F once ate a cherry pie in a record 7 seconds.Nicolas F once ate a cherry pie in a record 7 seconds.Nicolas F once ate a cherry pie in a record 7 seconds.Nicolas F once ate a cherry pie in a record 7 seconds.Nicolas F once ate a cherry pie in a record 7 seconds.Nicolas F once ate a cherry pie in a record 7 seconds.Nicolas F once ate a cherry pie in a record 7 seconds.Nicolas F once ate a cherry pie in a record 7 seconds.Nicolas F once ate a cherry pie in a record 7 seconds.Nicolas F once ate a cherry pie in a record 7 seconds.Nicolas F once ate a cherry pie in a record 7 seconds.
 
Posts: 161
Karma: 1842
Join Date: Jan 2016
Device: Kobo Glo HD
Quote:
Originally Posted by mzso View Post
Well, the header options are in the converter settings in the pdf output section.
You should have posted the capture directly, it would have ben easier to understand what you want to do.

The line goes at the top because you're using float. Your text is "floating" on the left or the right but it's not taken in consideration for the placement of the border. You need to add another <p> element at the end with clear:both,
for exemple:
Code:
<div style="font-size:x-small;"><p style="float:left;">_TITLE_</p><p style="float:right;"><i>_SECTION_</i></p><p style="clear:both;" /></div><hr />
or
Code:
<div style="font-size:x-small;border-bottom: 2px solid black;"><p style="float:left;">_TITLE_</p><p style="float:right;"><i>_SECTION_</i></p><p style="clear:both;" /></div>
Nicolas F is offline   Reply With Quote
Old 02-06-2018, 12:17 PM   #24
mzso
Enthusiast
mzso began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Feb 2018
Device: PC
Quote:
Originally Posted by Nicolas F View Post
You should have posted the capture directly, it would have ben easier to understand what you want to do.

The line goes at the top because you're using float. Your text is "floating" on the left or the right but it's not taken in consideration for the placement of the border. You need to add another <p> element at the end with clear:both,
for exemple:
Code:
<div style="font-size:x-small;"><p style="float:left;">_TITLE_</p><p style="float:right;"><i>_SECTION_</i></p><p style="clear:both;" /></div><hr />
or
Code:
<div style="font-size:x-small;border-bottom: 2px solid black;"><p style="float:left;">_TITLE_</p><p style="float:right;"><i>_SECTION_</i></p><p style="clear:both;" /></div>
Thanks. Though still not quite right. I didn't get any line at all.
So on a hunch I increased the header height (I had it set at 40 as you can see above). and after that the line appeared. So it seems that the line is overlapped by the content. (Which means some of my attempts might have been successful also)
It's also too far below the header text to be aesthetic.

Is this supposed to happen? It feels like a bug to me, I'd expect the div to not be able to extend below the content.


Never mind. I figured out a way to fix this. (See below.)

Last edited by mzso; 02-06-2018 at 12:42 PM.
mzso is offline   Reply With Quote
Old 02-06-2018, 12:32 PM   #25
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,661
Karma: 127838196
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
The line should be closer to the header text and more space below the line.
JSWolf is online now   Reply With Quote
Old 02-06-2018, 12:37 PM   #26
mzso
Enthusiast
mzso began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Feb 2018
Device: PC
So I managed to tweak it by setting the div height:

Code:
<div style="font-size:x-small;border-bottom: 1px solid black; height: 30pt; "><p style="float:left;">_TITLE_</p><p style="float:right;"><i>_SECTION_</i></p><p style="clear:both;" /></div>
Thanks Nicolas F!
mzso is offline   Reply With Quote
Old 02-06-2018, 12:41 PM   #27
Nicolas F
Groupie
Nicolas F once ate a cherry pie in a record 7 seconds.Nicolas F once ate a cherry pie in a record 7 seconds.Nicolas F once ate a cherry pie in a record 7 seconds.Nicolas F once ate a cherry pie in a record 7 seconds.Nicolas F once ate a cherry pie in a record 7 seconds.Nicolas F once ate a cherry pie in a record 7 seconds.Nicolas F once ate a cherry pie in a record 7 seconds.Nicolas F once ate a cherry pie in a record 7 seconds.Nicolas F once ate a cherry pie in a record 7 seconds.Nicolas F once ate a cherry pie in a record 7 seconds.Nicolas F once ate a cherry pie in a record 7 seconds.
 
Posts: 161
Karma: 1842
Join Date: Jan 2016
Device: Kobo Glo HD
Try playing around with height property:
Code:
<div style="font-size:x-small;border-bottom: 2px solid black;height:30px;"><p style="float:left;height:30px;">_TITLE_</p><p style="float:right;height:30px;"><i>_SECTION_</i></p><p style="clear:both;" /></div>
There is probably a better way to do this, but it should work

Edit:Too late! It's good it worked for you!
Nicolas F is offline   Reply With Quote
Old 02-06-2018, 06:35 PM   #28
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,447
Karma: 157030631
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by HarryT View Post
Fair enough, but it's the code that matters, not the place where it's used, and this is the correct forum to discuss coding issues.
Actually, Harry, I'd have said the Workshop Forum, at most; given that his issue is with a Calibre conversion--from ePUB to PDF--I think he'd have been better off at the Calibre forums. But...you're the Greenie!

Hitch
Hitch 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
horizontal line on screen of Kobo Aura One sbin Kobo Reader 10 10-31-2016 08:47 AM
Horizontal line running through Nook HD+ Screen LornaH75 Nook Color & Nook Tablet 1 07-22-2013 07:53 PM
special characters e & i with horizontal line above cybmole Sigil 22 04-17-2013 11:00 AM
PRS-600 Horizontal line at start of chapter Gernella Sony Reader 0 01-03-2010 10:28 AM
Horizontal white line DrMoze Sony Reader 5 01-14-2008 10:57 AM


All times are GMT -4. The time now is 07:16 AM.


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