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

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

Notices

Reply
 
Thread Tools Search this Thread
Old 03-01-2019, 10:21 AM   #106
Julie34
Member
Julie34 began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Oct 2017
Location: where is my heart
Device: Kobo Glo, and...
Many thanks for this plug-in. It works fine, even with very big files (I converted today a book: 1185 pages on Prince PDF, 453 notes: perfect conversion). Some kick small changes with Foxit PhantomPdf (full page image for front page, open full screen, and so on).
A small problem however. At the end of an epub3, there is a table of content. And the characters on Prince table become really to big. I do 18 pt for body (PDF to be readen on small screens). The configuration I use (could be certainly better but works):

Code:
@font-face {
  font-family: serif;
  src: local("Droid Serif")
}
*/

@page {
  size: 9cm 12cm;
  margin: 5mm 1mm 1mm 1mm !important;
  @top-left {
    font-size: 30%;
    font-style: italic;
    border-bottom: solid thin black;
    margin-bottom: 1mm;
    content: string(booktitle);
  }
  @top-center {
    font-size: 40%;
    font-style: italic;
    border-bottom: solid thin black;
    margin-bottom: 1mm;
    content: string(chaptertitle);
  }
  @top-right {
    font-size: 30%;
    border-bottom: solid thin black;
    margin-bottom: 1mm;
    content: counter(page) "/" counter(pages);
  }
}

@page:first {
  margin: 1mm 1mm 1mm 1mm;
  @top-left {
    border-width: 0;
    margin: 0;
    content: normal;
  }
  @top-center {
    border-width: 0;
    margin: 0;
    content: normal;
  }
  @top-right {
    border-width: 0;
    margin: 0;
    content: normal;
  }
}

body {
  font-size: 18pt;
  font-family: Amasis30;
  text-align: justify;
  prince-image-resolution: 166dpi;
  hyphens: auto;
  string-set: booktitle "@{@{title}@}@" author "@{@{author}@}@";
}
For the table, I get: PXAAB+Amasis30 (Embeded), 18 pt characters and it is really too big!
I do not succeed to correct it, except manually on Foxit (but it is fastidious).
Any possibility to adapt my (clumsy) configuration ?
Thanks.

Last edited by Jellby; 03-11-2019 at 03:25 PM.
Julie34 is offline   Reply With Quote
Old 03-11-2019, 03:25 PM   #107
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,131
Karma: 9648489
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Can you share a sample epub file?
Jellby is offline   Reply With Quote
Advert
Old 03-15-2019, 04:47 AM   #108
Julie34
Member
Julie34 began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Oct 2017
Location: where is my heart
Device: Kobo Glo, and...
Thank you for your answer. I sent you sample file by private message,
Julie34 is offline   Reply With Quote
Old 03-16-2019, 06:06 AM   #109
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,131
Karma: 9648489
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
I don't know why the TOC comes out so big, must be some default style of Prince. You can add something like this to the stylesheet:

Code:
body.nomargin {
  page: cover;
}

@page cover {
  size: 565px 799px !important; /* hard-coded cover image size */
  margin: 0 -117px !important;  /* make virtual page width 800px */
}

nav * {
  font-size: 100%;
}
  
nav > ol {
  font-size: 75%;
}

nav ol {
  margin-left: 2em;
}

nav#landmarks {
  display: none;
}
Jellby is offline   Reply With Quote
Old 03-16-2019, 09:31 AM   #110
Julie34
Member
Julie34 began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Oct 2017
Location: where is my heart
Device: Kobo Glo, and...
Many thanks for the add to the style-sheet.

Works fine !
Specially for the TOC.

For the page cover, if you write :

@page cover
{ size: ...

it define the size of the cover page, but not of the image : I got a 565 x 799 page with a small image and normal pages after.
I tried "cover-size:" I does not work (you may write differents value with no change) but you get a no margin image up and down with small lateral margins (because of the image proportions, I suppose). Easely corrected.
(I put your code add at the end of the style-sheet : correct ?).
A last information : I do my epub3 with epub3itizer Sigil plug-in, as my prefered (but old) epub-converter does epub2 only. That is the moment the TOC table is added.
Thank you !
Julie34 is offline   Reply With Quote
Advert
Old 03-17-2019, 04:24 AM   #111
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,131
Karma: 9648489
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by Julie34 View Post
For the page cover, if you write :

@page cover
{ size: ...

it define the size of the cover page, but not of the image : I got a 565 x 799 page with a small image and normal pages after.
Right, the particular epub I tried it with had a 565x799 cover. If you want to use this, you should adapt it for the specific cover size of each epub. If it is X pixels wide and Y pixels high:

Code:
@page cover {
  size: Xpx Ypx !important;
  margin: 0 -(Y-X)/2px !important;
}
That is the best I could come up with after some trial and error, due to the way Prince is scaling images. (This was some time ago, it may have changed in the latest Prince version.) You can of course use different units or scaling factor, but it's important that the relative values are as above.[/QUOTE]
Jellby is offline   Reply With Quote
Old 03-17-2019, 10:28 AM   #112
Julie34
Member
Julie34 began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Oct 2017
Location: where is my heart
Device: Kobo Glo, and...
Thank you for your answer.

Anyway, your code add is real improvement, thanks a lot, as my problem was vith the TOC table.
For the cover, (all my cover images are 565 x 799) I prefer to have the first page the same size of the rest of the PDF and with your code (without @page cover {size...) the image I get is almost perfect (much than before). Just a very small adaptation to enlarge it to the page size (as anyway I do "open full page" and supress the eventual automatic caesura in the title wih FoxitPDF).

Anyway I greatly appreciate this (almost) one click conversion to PDF with Prince PDF. Great job! and Thank you!
Julie34 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
[GUI Plugin] EpubMerge JimmXinu Plugins 341 Yesterday 10:00 PM
[GUI Plugin] Ex Libris AlPe Plugins 77 06-16-2019 09:51 PM
[GUI Plugin] KindleUnpack - The Plugin DiapDealer Plugins 412 04-24-2018 06:07 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 09:34 AM.


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