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 08-06-2012, 04:38 AM   #16
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,514
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
The file has a few errors. I suggest you use Sigil to fix it and validate it.

First, image files are missing from the ePub (I see they are only referenced in the CSS, probably in unused styles, though). Second, the title.html has two DTD lines, and they are incorrect. The .html files must be XHTML (which means they must have closing tags, have all tags in lowercase, etc.). Then the problem with footnotes.html is that you have & instead of &
Jellby is offline   Reply With Quote
Old 08-06-2012, 06:23 AM   #17
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Thanks to your previous post, I discovered your nice and clever tool/script and GUI (better late than never).

As my EPUBs are the product of odt files tweaked with Sigil, it could really be very useful to enjoy justified text, at long last without losing any Sigil-produced enhancements.

I use v 1.2 and tried to convert one of my EPUBs. I have two questions:

1. - I think I've got on my Linux all dependencies but I have this (see screenshot). It reports it does not find a file, where can I inform him about the right path to it?

2. - All my EPUB use two file sheets which are of course correctly manifested. Have I to do something special?
Attached Thumbnails
Click image for larger version

Name:	libssl.png
Views:	526
Size:	74.5 KB
ID:	90227  

Last edited by roger64; 08-06-2012 at 06:29 AM.
roger64 is offline   Reply With Quote
Old 08-06-2012, 06:39 AM   #18
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,514
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by roger64 View Post
1. - I think I've got on my Linux all dependencies but I have this (see screenshot). It reports it does not find a file, where can I inform him about the right path to it?
That looks like a problem with Prince, not with the script/GUI... Anyway, maybe you can install libssl0.9.8, apparently I have both in my system:

/usr/lib32/libssl.so.0.9.8
/usr/lib32/libssl.so.1.0.0

Quote:
2. - All my EPUB use two file sheets which are of course correctly manifested. Have I to do something special?
No, all stylesheets referenced by the XHTML files should be automatically used (you can view them in the View CSS tab). To these stylesheets included in the book, two additional ones are added. One is the "Default CSS" which is ~/.epub2pdf/default.css, this is intended for settings that you want to apply to all your epub2pdf conversions, like page size, fonts, etc. The other is the "Additional CSS" which is an ad-hoc stylesheet intended for a specific book without having to modify the book itself. I don't remember the priority order now, you may have to use "!important" to override some styles.
Jellby is offline   Reply With Quote
Old 08-06-2012, 08:42 PM   #19
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Nota: The installation problems above this post were resolved using the static package instead of the dynamic one.

Conclusion: Wonderful software!!!

I can now have a PDF with embedded fonts, dropcaps, full cover page and a justified text. The total weight of the file went up from 490 k to 920 k which is quite OK.

No work to do. As far as your original EPUB uses styles, no problem.

Thank you very much!! Congratulations to Jellby and Prince.

I join this six inches (9x12) PDF as a proof. The original EPUB has been published on MR some days ago.

@Jellby
EDIT: I tried to produce a 9.7inch PDF (that is 14.8cm 19.7cm) and I did produce a frame of this size but the image and text were not increased beyond 9x12. I surely did something wrong, can you produce one for me as a demo (and explain)?
The original EPUB is here.
Attached Files
File Type: pdf Marcheurs.pdf (920.6 KB, 863 views)

Last edited by roger64; 08-07-2012 at 01:29 AM. Reason: 9.7 inch?
roger64 is offline   Reply With Quote
Old 08-07-2012, 04:41 AM   #20
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,514
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
How about this? I just used this default.css:

Code:
@page {
  size 14.8cm 19.7cm;
  margin: 5mm;
}
By the way, you have a mix of straight and curly apostrophes in the text.
Attached Files
File Type: pdf Marcheurs.pdf (798.4 KB, 654 views)
Jellby is offline   Reply With Quote
Old 08-07-2012, 08:40 AM   #21
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
@Jellby

Thanks a lot for your precious help. One reader reported me that he could not read my EPUBs with his brand new ONYX M92. I think, this way, it is possible to offer him a 9.7 inches PDF solution without having to renounce the use of embedded fonts, dropcaps and other niceties. And for the trouble, he gets on top of this a justified text...

I'll fix these disordered apostrophes. Thank you also for spotting this. C'est une honte.

BTW, I wonder also if the CSS kind of PDF produced with Prince could not allow the use of thin spaces? When you display a ragged text, like in common EPUBs, it may seem superfluous to bother about thin spaces. When you have a nice justified hyphenated text..., then maybe it's time to think seriously about it.

Last edited by roger64; 08-07-2012 at 08:51 AM.
roger64 is offline   Reply With Quote
Old 08-09-2012, 02:58 AM   #22
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
There is no doubt that this software (Jellby's + Prince) allows to produce seamlessly from a source EPUB, PDF files of an excellent quality. I know it because, with a lot of Jellby's help, I succeeded.

Beyond the limits?

There is a human tendency to always try to push the limits a little further. Now that I enjoy justified and hyphenated text, I think about "optically justified text". Would this be possible using Prince? What also about inserting thin spaces? This can be done using emulation. Is there a nicer way to do it using Prince?
roger64 is offline   Reply With Quote
Old 08-09-2012, 05:13 AM   #23
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,514
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by roger64 View Post
I think about "optically justified text". Would this be possible using Prince?
That would be a feature request for Prince... and it's already in the roadmap.

Quote:
What also about inserting thin spaces? This can be done using emulation. Is there a nicer way to do it using Prince?
Thin spaces can be used all right. I guess your problem is that you don't use thin spaces in the epub, because some readers/fonts do not support them, and you want to use them in Prince instead...

Depending on how you faked the thin spaces in the epub, you could either preprocess the xhtml files before feeding them to Prince, or set some transformations on-the-fly. For example, if you have <span class="thinsp"> </span>, maybe this works:

Code:
span.thinspace { content: "?" }
where ? is either the thin space UTF-8 character or its code in whatever format understood by CSS.
Jellby is offline   Reply With Quote
Old 08-09-2012, 05:46 AM   #24
Trouhel
Enthusiast
Trouhel began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Oct 2011
Device: none
What you call "optically justified text" is but a feature in a set of typographic techniques. It's on Prince's roadmap, but they still have quite a way to go before doing high-quality typography. This said, it certainly is a state of the art software on other matters, but not on that particular point.

So, why not go with what already exists and is a long time proven solution: LaTeX (using pdfTeX as engine) does what it calls "microtypography" (cf. wikipedia on the subject, as a start). I don't no how far it goes with using True and Open Type fonts natively (the SIL XeTeX engine cannot use the microtype package): that's why ConTeXt (using the LuaTeX engine), is to me, besides being much more user friendly, one of the best solution (integration ofLuaTeX into LaTeX is on ongoing process, but, from what I've seen so far, it looks like not yet ready for non-expert end users).

Of course, InDesign does that, and a lot more, but it's a different ball game.

With LaTeX+microtype or ConTeXt, you'll get protrusion (which manages hanging punctuation) and expansion (using Hermann Zapf's HZ algorithm, as InDesign does), and actually some more goodies with LaTeX, such as kerning adjustment, etc. You can read the ConTeXt manual on typography, from p.33, or the documentation for the LaTeX microtype package, if you want to know more.

Now, to be effective, microtypography must be done on a font face par font face basis, because settings that will work for one may lead to a disaster with another. It might even have to be done on a face+script basis, when using different scripts.

So, it always comes back to the same story when it comes to printing quality, in the free open source world that is, and it spells TeX, there's no way around. Now, the choice of one or the other macro-package and PDF engine must be carefully made depending on your own needs (fonts, scripts, typographic features are some of the points that must be given attention).

Don't listen to the "high learning curve" talk and give it a try: getting started is easier than it looks like at first glance.
Trouhel is offline   Reply With Quote
Old 08-09-2012, 05:54 AM   #25
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
EDIT: My mistake. This code is not good. Among other errors, it creates breakable spaces.
I suppressed it. Sorry for this.

I find this not very useful to try to fake thin spaces with the EPUB
- it really clutters the code with tons of spans
- the usual EPUB text display is ragged (non justified) and it would be a little like feeding caviar to a crocodile.

But of course, the nice "Prince" PDF display makes me reconsider this question.

If I did it this way above , what rule should I write instead of content: "?"

@Trouhel: sorry, I saw your post too late. I'll reply later.

Last edited by roger64; 08-09-2012 at 02:19 PM. Reason: Wrong code. Suppressed.
roger64 is offline   Reply With Quote
Old 08-09-2012, 05:56 AM   #26
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,514
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by Trouhel View Post
So, why not go with what already exists and is a long time proven solution: LaTeX (using pdfTeX as engine)
Sure, that's best, but converting an arbitrary ePub to LaTeX or similar is far from trivial.
Jellby is offline   Reply With Quote
Old 08-09-2012, 06:12 AM   #27
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
My wish is very limited on this field because I am not a professional. If only I was able to adapt TNR and Libertine regular fonts, I would feel satisfied.

But really, I feel a little afraid about Latex and other brothers. A small EPUB on one side, a cathedral on the other...
roger64 is offline   Reply With Quote
Old 08-10-2012, 07:15 AM   #28
Heisenberg
Junior Member
Heisenberg began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Aug 2012
Device: none
Quote:
Originally Posted by Jellby View Post
The file has a few errors. I suggest you use Sigil to fix it and validate it.

First, image files are missing from the ePub (I see they are only referenced in the CSS, probably in unused styles, though). Second, the title.html has two DTD lines, and they are incorrect. The .html files must be XHTML (which means they must have closing tags, have all tags in lowercase, etc.). Then the problem with footnotes.html is that you have & instead of &amp;
Ok the only error which matters to me is the one with the footnotes.
I don't see missing images or other major problems?!
But I don't understand what you mean by
Quote:
Then the problem with footnotes.html is that you have & instead of &amp;
I can't find any & without amp in the footnotes.html?! Or was that meant the other way around?

Thanks & Regards
Heisenberg is offline   Reply With Quote
Old 08-10-2012, 07:30 AM   #29
Heisenberg
Junior Member
Heisenberg began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Aug 2012
Device: none
Quote:
Originally Posted by Heisenberg View Post
Ok the only error which matters to me is the one with the footnotes.
I don't see missing images or other major problems?!
But I don't understand what you mean by

I can't find any & without amp in the footnotes.html?! Or was that meant the other way around?

Thanks & Regards
ok, now I see the problem I think. I validated the epub with sigil and the footnotes issue is fixed, but now the images are missing
don't know what to do to fix the problem
Heisenberg is offline   Reply With Quote
Old 08-10-2012, 07:45 AM   #30
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,514
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by Heisenberg View Post
ok, now I see the problem I think. I validated the epub with sigil and the footnotes issue is fixed, but now the images are missing
don't know what to do to fix the problem
Since this is unrelated to the epub->pdf conversion, I suggest you create a new thread either here in the ePub forum or in the Sigil one. Your problem with the images was that there were many references in the css file, just remove the unused styles, or add the images.
Jellby 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
converting pdf to epub Gagan ePub 65 06-28-2017 11:57 PM
Converting Sanskrit PDF to epub sriniamble Calibre 17 11-25-2010 06:10 AM
Error converting to PDF from EPub and PRC gauravj Calibre 3 05-24-2010 02:07 AM
Problem converting pdf to epub smartin Calibre 3 05-02-2010 06:55 AM
Help with converting PDF to epub neilmarr Sigil 6 11-14-2009 09:26 AM


All times are GMT -4. The time now is 05:45 AM.


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