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 05-05-2018, 10:29 PM   #91
bakodragon
Junior Member
bakodragon began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jan 2014
Device: KINDLE PAPERWHITE 2
Quote:
Originally Posted by Jellby View Post
It should be:

Code:
body.especial {
...
}
Maybe there's already some css in the book that overrides the font for this class. Can you share the book?
Thanks for reply, adding didn't seem to work.

Here you have the book. The <body class="especial"> clausure begins in "Libro01.xhtml" to "Libro05.xhtml" whichs is actually the main book, the other chapters are introductions and bibliography that have the normal <body> clausure.

Moderator Notice
File removed, as it is most likely a copyrighted translation

Last edited by Jellby; 05-06-2018 at 02:42 AM.
bakodragon is offline   Reply With Quote
Old 05-06-2018, 02:57 AM   #92
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,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
The file OEBPS/Styles/style.css within the book indeed contains:

Code:
body.especial { font-family:"Times New Roman", Times, serif; margin:1em 0 1em 1em; }
which is bad coding. You could remove the font-family part (with the calibre book editor, for example), or you could try overriding it by adding "!important" to the body font-family:

Code:
body {
font-size: 8pt;
font-family: Bookerly, serif !important;
...
}
Jellby is offline   Reply With Quote
Old 05-06-2018, 05:48 PM   #93
bakodragon
Junior Member
bakodragon began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jan 2014
Device: KINDLE PAPERWHITE 2
Quote:
Originally Posted by Jellby View Post
The file OEBPS/Styles/style.css within the book indeed contains:

Code:
body.especial { font-family:"Times New Roman", Times, serif; margin:1em 0 1em 1em; }
which is bad coding. You could remove the font-family part (with the calibre book editor, for example), or you could try overriding it by adding "!important" to the body font-family:

Code:
body {
font-size: 8pt;
font-family: Bookerly, serif !important;
...
}

Thanks, I tried both solutions and both worked perfectly. Again, I thank you for this plug-in, which I usually use to read my books without margins and with more customization.
bakodragon is offline   Reply With Quote
Old 06-05-2018, 06:47 AM   #94
Togijak
Enthusiast
Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.
 
Togijak's Avatar
 
Posts: 29
Karma: 447178
Join Date: Jan 2014
Device: Kobo H2O
@Jellby

I am a new user of prince (11.4) and I found some hours ago your plugin. My first try ends with an error and that protocol

Code:
calibre, version 3.25.0
FEHLER: Konnte nicht in PDF konvertieren: Die Konvertierung ist fehlgeschlagen.Prüfen Sie das Protokoll.

prince: loading document: C:\Program Files (x86)\Prince\engine\license\license.dat
prince: Loading document...
prince: loading HTML5 input: text00000.html
prince: loading document: text00000.html
prince: Applying style sheets...
prince: loading style sheet: C:\Users\UserName\AppData\Local\Temp\calibre_c8wnu_\o5kasr
prince: loading HTML5 input: text00001.html
prince: loading document: text00001.html
prince: Applying style sheets...
prince: loading style sheet: C:\Users\UserName\AppData\Local\Temp\calibre_c8wnu_\o5kasr
prince: loading HTML5 input: text00002.html
prince: loading document: text00002.html
prince: Applying style sheets...
prince: loading style sheet: C:\Users\UserName\AppData\Local\Temp\calibre_c8wnu_\o5kasr
prince: loading HTML5 input: text00003.html
prince: loading document: text00003.html
prince: Applying style sheets...
prince: loading style sheet: C:\Users\UserName\AppData\Local\Temp\calibre_c8wnu_\o5kasr
prince: loading HTML5 input: text00004.html
prince: loading document: text00004.html
prince: Applying style sheets...
prince: loading style sheet: C:\Users\UserName\AppData\Local\Temp\calibre_c8wnu_\o5kasr
prince: loading HTML5 input: text00005.html
prince: loading document: text00005.html
prince: Applying style sheets...
prince: loading style sheet: C:\Users\UserName\AppData\Local\Temp\calibre_c8wnu_\o5kasr
prince: loading HTML5 input: text00006.html
prince: loading document: text00006.html
prince: Applying style sheets...
prince: loading style sheet: C:\Users\UserName\AppData\Local\Temp\calibre_c8wnu_\o5kasr
prince: Preparing document...
prince: Converting document...
prince: used font: Times New Roman, Italic
prince: used font: Times New Roman, Regular
prince: loading hyphenation patterns: C:\Program Files (x86)\Prince\engine\style\..\hyph\hyph-en-us.pat
prince: used font: Times New Roman, Bold
prince: Resolving cross-references...
prince: loading hyphenation patterns: C:\Program Files (x86)\Prince\engine\style\..\hyph\hyph-en-us.pat
prince: Ganser, Daniele\Illegale Kriege_ Wie die NATO-Lander die UNO sabotieren. Eine Chronik von Kuba bis Syrien\Illegale Kriege_ Wie die NATO-Lander die UNO sabotieren. Eine Chronik von Kuba bis Syrien - Daniele Ganser.pdf: error: can't open output file: No such file or directory
prince: Finished: failure
where is the problem and how could it be solved
Togijak is offline   Reply With Quote
Old 06-05-2018, 04:47 PM   #95
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,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
It could have something to do file/folder names and Windows... The error is in the second to last line.

I tried my best to have the code work properly in different platforms, unfortunately I don't have a Windows machine to test it on, so there could be some rough edges left. Try using a shorter/simpler folder name and title for the book. Do you have the "add file to the book record" option checked?
Jellby is offline   Reply With Quote
Old 06-06-2018, 01:47 AM   #96
Togijak
Enthusiast
Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.
 
Togijak's Avatar
 
Posts: 29
Karma: 447178
Join Date: Jan 2014
Device: Kobo H2O
@Jellby

Thx for the quick reaction. After your hint a give the plugin another try (using a book with a short name) and here it works, but the result is bullshit as you can see.








and the same problem again using the book with the long name




Your comment sounds like you are using Linux? If that is what you are using there are two ways to run Windows software inside of Linux. The first (and better) option would be to install VMware Workstation where you can install inside a full Windows version. The other option would be to use Wine (no experience) but you find here a list of all software that was tested on Wine.

If you need help to find what you need if you are interested please use PN or if you use PGP / GPG (some information never should be readable public | a mailserver admin is also public for me) we could communicate by mail.

regards

Togijak
Togijak is offline   Reply With Quote
Old 06-06-2018, 04:49 AM   #97
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,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by Togijak View Post
Thx for the quick reaction. After your hint a give the plugin another try (using a book with a short name) and here it works, but the result is bullshit as you can see.
That might be due to poor ePub coding. Try changing the page and font size.

Quote:
Your comment sounds like you are using Linux? If that is what you are using there are two ways to run Windows software inside of Linux.
Yes, I'm using Linux, but I don't know if I have the time and energy to go through the hassle of installing some kind of Windows (+ developing environment) just to test this. It would be much easier if someone who uses Windows regularly could debug the problem.
Jellby is offline   Reply With Quote
Old 06-06-2018, 04:16 PM   #98
Togijak
Enthusiast
Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.
 
Togijak's Avatar
 
Posts: 29
Karma: 447178
Join Date: Jan 2014
Device: Kobo H2O
@Jellby

Looks like that plugin has a problem. I converted the first book with epubor (uses calibre engine inside) from epub to PDF without any problems. You are right that one book could be a problem but 2 and more with problems

4 Pages from the converted PDF as picture (to big to inserte)

Would be fine if the plugin problem could be found and fixed.
Togijak is offline   Reply With Quote
Old 06-07-2018, 04:52 AM   #99
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,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by Togijak View Post
Looks like that plugin has a problem. I converted the first book with epubor (uses calibre engine inside) from epub to PDF without any problems. You are right that one book could be a problem but 2 and more with problems
Do you mean problems with failed conversion? Yes, I hope the issue can be fixed. It could also be some limitation regarding filenames (length or allowed characters) in Windows.

If you mean problems with how the generated PDF looks, the plugin does very little, most of it is Prince's doing. The rest is just default CSS and ePub coding, so it's a matter of adjusting the style. Note that the plugin defaults to small pages (for reading in an ebook reader) and not to A4/letter (for printing).

Quote:
4 Pages from the converted PDF as picture (to big to inserte)
You can include images of any size if you do it as an "attachment", rather than as inline images.
Jellby is offline   Reply With Quote
Old 06-07-2018, 08:34 AM   #100
Togijak
Enthusiast
Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.
 
Togijak's Avatar
 
Posts: 29
Karma: 447178
Join Date: Jan 2014
Device: Kobo H2O
I don't think that limitation regarding filenames (length or allowed characters) in Windows are the problem, the name was created from Calibre and all Windows operation with this file (including automatic synchronization of the lbrary) are working well.

I understand that the plugin defaults to small pages (for reading in an ebook reader) but why epubor converting the pagesize correct from epub to pdf? For me that's the same situation.

The reason why I hope that the problem can be fixed is that I build some month ago something I called e-Book Postprocess Toolbox and I want to build in the near future a new updated version. There was Calibre integrated and it would be fine if the next version has a integrated Prince plugin.
Attached Thumbnails
Click image for larger version

Name:	e-Book Postprocess Toolbox.png
Views:	276
Size:	545.3 KB
ID:	164343  

Last edited by Togijak; 06-07-2018 at 08:45 AM.
Togijak is offline   Reply With Quote
Old 06-07-2018, 04:06 PM   #101
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,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Have you tried without the "PDF zum Bucheintrag hinzufügen" option? (I don't use this option, so it is less tested, even in Linux.)

Quote:
I understand that the plugin defaults to small pages (for reading in an ebook reader) but why epubor converting the pagesize correct from epub to pdf? For me that's the same situation.
What do you mean? It seems to me your epubor results have an A4-like size (margins/font size relative to page). You can get something similar with Prince and this plugin if you change the defaults under @page.

If the book has, for example, some hard-coded font or picture sizes such that some element takes 15 cm, it will fit a 21 cm wide page with 2 cm margins, but it won't fit a 9 cm wide page with 2 mm margins. If the book is coded in such a way that this element cannot scale or reflow... well, it's the book's fault. The other difference I saw in your example is that one version has an "Overview" where the other has the TOC, this could be due to epubor ignoring nonlinear elements, or adding something of its own, or some other tricks. If you can share an ePub file and specify what you would like to get, I may be able to devise a style file for conversion.

Last edited by Jellby; 06-08-2018 at 02:50 AM.
Jellby is offline   Reply With Quote
Old 06-08-2018, 06:16 AM   #102
Togijak
Enthusiast
Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.
 
Togijak's Avatar
 
Posts: 29
Karma: 447178
Join Date: Jan 2014
Device: Kobo H2O
@Jellby

You are right the book that I used for the first test includes much errors. After your comment I open it first in Calibre editor and there where no important errors shown after test (only 2 parts to big) but after using pagina EPUB-Checker I was shocked. The error list was so long that I stopped the tool and the check in Sigil with the FlightCrew plugin results a similar error list.

Next test was with a purchased epub where I only removed the DRM and here was only one unimportant error in pagina EPUB-Checker. The first result was for the trash and I started to change some page definitions and after playing around a wile I was happy with the result. (see attached pictures)

I think your argument why you delinted the page size can't be accepted. No normal user will read a eBook in PDF format on a eBook reader if he has the epub. Normal use of a PDF is on a tablet, handheld or computer and in my opinion the eBook should look more like a normal book. That was the reason to not only change the page size to A5 (14,8 / 21 cm). I also changed the margin to 15mm.

For the moment there is for me only two question left
  1. Can I and if yes how define some different output size / style definitions like A4, A5 (German norm size for paper) for example that could be loaded?
  2. Is there a known tool that can fix errors without handwork in a epub?
Attached Thumbnails
Click image for larger version

Name:	book with errors in Calibre epub editor.jpg
Views:	307
Size:	210.1 KB
ID:	164373   Click image for larger version

Name:	compare Prince A5 with ePubor 1.jpg
Views:	315
Size:	420.5 KB
ID:	164374   Click image for larger version

Name:	looks more like a book.jpg
Views:	305
Size:	158.9 KB
ID:	164375  

Last edited by Togijak; 06-08-2018 at 06:18 AM.
Togijak is offline   Reply With Quote
Old 06-08-2018, 11:59 AM   #103
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,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by Togijak View Post
I think your argument why you delinted the page size can't be accepted. No normal user will read a eBook in PDF format on a eBook reader if he has the epub. Normal use of a PDF is on a tablet, handheld or computer and in my opinion the eBook should look more like a normal book. That was the reason to not only change the page size to A5 (14,8 / 21 cm). I also changed the margin to 15mm.
Different usages for different people. I created the plugin for myself first, and for anyone else who might find it useful. I don't typically create a PDF, but if I do, it would be for reading on screen, computer or ebook reader. Even in a computer, I'd prefer the font/page size ratio of an ebook reader rather than A4. A5 would probably be fine too. Note that what you find when you first install the plugin is just some default I thought could be sensible or useful as a starting point, feel free to modify it to your liking.

There could be several reasons for reading a PDF instead of an ePub in an ebook reader:
  1. Maybe the reader does not support ePub at all (like some older ones).
  2. Maybe the reader does not support some features the ePub uses or the user would like to have (like some specific font, some CSS properties...)
  3. The typesetting quality (linebreaks, ligatures, kerning, etc.) is probably better in the PDF than in the direct ePub rendering, i.e., Prince cares about typesetting more than Adobe.
  4. Page breaks are fixed in the PDF, and page numbers match the actual pages. This can be desired for annotations and sharing between different readers (people or devices).

Quote:
For the moment there is for me only two question left

1. Can I and if yes how define some different output size / style definitions like A4, A5 (German norm size for paper) for example that could be loaded?
Yes, there is. Click Configure, then in Custom Styles you can create, rename, add, delete styles, which you can then select in the "Benutzerdefinierter Stil" drop down list.

Quote:
2. Is there a known tool that can fix errors without handwork in a epub?
I don't think so. There's not even an agreement on what's an "error".
Jellby is offline   Reply With Quote
Old 06-08-2018, 02:01 PM   #104
Togijak
Enthusiast
Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.Togijak ought to be getting tired of karma fortunes by now.
 
Togijak's Avatar
 
Posts: 29
Karma: 447178
Join Date: Jan 2014
Device: Kobo H2O
Quote:
Originally Posted by Jellby View Post
I don't think so. There's not even an agreement on what's an "error".

If it is not minimum conform with idpf 3.01 definition
Togijak is offline   Reply With Quote
Old 06-08-2018, 02:39 PM   #105
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,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
There's ePub 2, and calibre has its own interpretation of what's an error.
Jellby is offline   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:38 PM.


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