Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 07-12-2023, 04:15 PM   #151
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by Comfy.n View Post
Oh I hadn't noticed that author middle name change... though that trimming of 'Edition' to ', dition)' did puzzle me.
I'm pretty sure it's a last name (https://en.wikipedia.org/wiki/Spanish_naming_customs), but anyway, what's happening is that some characters are trimmed from the middle of each path section.
Jellby is offline   Reply With Quote
Old 07-12-2023, 04:34 PM   #152
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,004
Karma: 6422750
Join Date: Sep 2020
Device: Calibre E-book viewer
Quote:
Originally Posted by Jellby View Post
I'm pretty sure it's a last name (https://en.wikipedia.org/wiki/Spanish_naming_customs), but anyway, what's happening is that some characters are trimmed from the middle of each path section.
Oh I see, I thought it was the other way. I just tested adding some troublesome titles after unchecking that "Convert non-English..." option, but this didn't help. Tomorrow i'll fiddle some more with it, trying command line too

Last edited by Comfy.n; 07-13-2023 at 12:42 PM.
Comfy.n is online now   Reply With Quote
Advert
Old 07-12-2023, 04:43 PM   #153
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Jellby View Post
I'm pretty sure it's a last name (https://en.wikipedia.org/wiki/Spanish_naming_customs), but anyway, what's happening is that some characters are trimmed from the middle of each path section.
Calibre's save path code works by first computing the total path length then comparing that to the maximum allowed, which is system dependent. If the total is longer than the maximum then each segment of the path is shortened (from the middle) by enough to make the path fit.

You can control this process using a template that uses the template shorten() function for each name segment. The function lets you decide how many characters to remove from each segment, removing the randomness of the default process. If done correctly then the total length is guaranteed to be less than the maximum.
chaley is offline   Reply With Quote
Old 07-13-2023, 12:14 PM   #154
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Just to clarify, when I say "what's happening", it's just an explanation of why the path name is not the full author/title, which is fine and expected as per chaley's explanation. I don't mean that is the problem. It still puzzles me that you get different lengths, but that may be just my ignorance when using the template in the plugin's code. The problem seems to be that Prince itself (or the command-line interpreter that runs Prince) chokes on the path that's being passed. It could be that I'm not ensuring it's short enough, or it could be that Prince requires it shorter than the system limit, or it could be something else.
Jellby is offline   Reply With Quote
Old 07-13-2023, 06:37 PM   #155
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,004
Karma: 6422750
Join Date: Sep 2020
Device: Calibre E-book viewer
Hi Jellby,

For most conversions, I'm using this CSS:

PHP Code:
body  {background-color:transparent !important;}
@
font-face {font-familyserif;  srclocal("ChareInk6")}

@
page {
  
size17cm 32cm;
  
margin5mm 3mm 5mm 3mm !important;
    @
top-left {
    
font-size50%;
    
font-styleitalic;
    
border-bottomsolid thin black;
    
margin-bottom1mm;
    
contentstring(booktitle);
    
  }
  @
top-center {
    
font-size50%;
    
font-styleitalic;
    
border-bottomsolid thin black;
    
margin-bottom1mm;
    
contentstring(chaptertitle);
  }
  @
top-right {
    
font-size50%;
    
border-bottomsolid thin black;
    
margin-bottom1mm;
    
contentcounter(page"/" counter(pages);
  }
}

@
page:first {
  
margin1mm 1mm 1mm 1mm;

  @
top-left {
    
border-width0;
    
margin0;
    
contentnormal;
  }
  @
top-center {
    
border-width0;
    
margin0;
    
contentnormal;
  }
  @
top-right {
    
border-width0;
    
margin0;
    
contentnormal;
  }
}

body {
  
font-size15pt;
  
font-family"ChareInk6";  
  
text-alignjustify;
  
prince-image-resolution166dpi;
  
hyphensauto;
  
string-setbooktitle "@{@{title}@}@"
  
string-setauthor "@{@{author}@}@"
 

Now I noticed that, on books with large covers, the cover image exceeds the printing area on the converted PDF's first page.

Is there some CSS styling I can apply to get the cover to fit the page size (17cm x 32cm, in most cases)?

Last edited by Comfy.n; 07-13-2023 at 07:01 PM.
Comfy.n is online now   Reply With Quote
Advert
Old 07-14-2023, 03:22 AM   #156
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
I don't think there's a general solution. It depends on how the books is coded (and also Prince's behaviour has changed between versions in the past).

In many of my books I have something like:

Code:
/* specific code for the cover image */
@page cover {
  size: 600px 800px; /* hard-coded cover image size */
  margin: 0 -100px;  /* make virtual page width 800px */
}

body.cover {
  page: cover;
}
But this relies on:
* The cover image being in a <body class="cover"> tag.
* The cover image being 600x800 px exactly.
* The cover image being coded to use the full page.

At least at some point this worked fine for me.
Jellby is offline   Reply With Quote
Old 07-15-2023, 11:39 AM   #157
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,004
Karma: 6422750
Join Date: Sep 2020
Device: Calibre E-book viewer
Quote:
Originally Posted by Jellby View Post
I don't think there's a general solution.
Yes, that's what I thought. Fortunately, I've realized this happens only with a few titles, so it's just a matter of tweaking the cover styling in Editor to make it fit. Thanks.
Comfy.n is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] EpubMerge JimmXinu Plugins 522 04-01-2024 10:25 AM
[GUI Plugin] KindleUnpack - The Plugin DiapDealer Plugins 492 10-25-2022 08:13 AM
[GUI Plugin] Ex Libris AlPe Plugins 87 10-10-2020 03:10 PM
[GUI Plugin] Wordpress frescogamba Plugins 11 04-06-2015 09:09 PM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM


All times are GMT -4. The time now is 07:42 PM.


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