![]() |
#451 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
Quote:
Portrait mode may also split images depending where they are on the page although they are shrunk enough to fit on the page if they are near the top. I have asked Jinke to have an image selection view mode to be able to see the entire image and they are considering it. How big are the various images in your test epub? edit: in landscape they are not quite 760 pixels. There is a page margin around the image. I estimate something about 700 or a little more. Dale |
|
![]() |
![]() |
![]() |
#452 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,382
Karma: 27756918
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Hmm so perhaps I was wrong, in any case calibre will resize images to the SONY screen size if you use the SONY profile in the future.
You can achieve that effect by using the css img { width: 100% } That should resize horizontally as long as the individual <img> tags dont specify a width. Last edited by kovidgoyal; 04-09-2009 at 12:36 PM. |
![]() |
![]() |
![]() |
#453 | |
Reticulator of Tharn
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 618
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
|
Quote:
|
|
![]() |
![]() |
![]() |
#454 |
reader
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,977
Karma: 5183568
Join Date: Mar 2006
Location: Mississippi, USA
Device: Kindle 3, Kobo Glo HD
|
|
![]() |
![]() |
![]() |
#455 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
Quote:
In portrait mode page three displays the baby and the building down to just below the street lamp (minus the pole). Aspect ratio is maintained. Page 4 continues the building picture with some overlap (it shows about 1/2 the lamp and the pole. It then starts on the continuous gray scale image which is then continue to page 5 along with the 16 level image. Dale |
|
![]() |
![]() |
![]() |
#456 | |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,382
Karma: 27756918
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Quote:
Code:
img { max-width: 100%; max-height: sony reader screen height } |
|
![]() |
![]() |
![]() |
#457 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 610
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-T3, Kobo Libra H2O
|
I am not so sure this would do a proper resize.
And it certainly wouldn't help with those "too large to be displayed" images :-( |
![]() |
![]() |
![]() |
#458 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,382
Karma: 27756918
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
![]() |
![]() |
![]() |
#459 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 610
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-T3, Kobo Libra H2O
|
I know. I appreciate that.
|
![]() |
![]() |
![]() |
#460 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
|
.Lit conversion to epub
Hi,
I just started converting some .lit files to epub, and I'm noticing some nasty behavior around css. When converted to HTML, lit files make heavy use of <span></span> tags embedded within <p></p> tags. Every single line/paragraph in the entire book is embedded between these tags. A single line or paragraph starts like this: <p class="MsoPlainText" id="calibre_css_id_533"><span class="calibre_class_2" id="cfs_1100"> The problem comes with the way Calibre handles the CSS generation. Every single tag in the book gets it's own unique id on top of the class. 99% of these ids use the same settings. The ids in the <p> tags are all setting the text-indent and font size, which never changes in my test (so it could be made part of the class). The ids in the <span> tags are setting a handful of font sizes. Needless to say this makes it impossible to reformat the book using the flexibility of css. I'm also seeing performance issues in some readers as they try to deal with rendering html with thousands of unique ids. Here are all the tags/classes that were duplicated in a book I just converted:
Note the same handling of <p> and <span> tags happens if I use ConvertLit to convert to HTML and then convert the resulting HTML to epub. Can Calibre just check to see if a given setting has been used in an existing CSS or class before creating a new ID? Seems like this would fix the problem. If you point me to the section of code where these decisions are made I can see if I can work out any options myself, but that might be beyond my skills at the moment. Other issues: Chapter Detection When I was creating epubs from PDFs I got a decent handle around how chapter detection functioned in that workflow. If it matches the xpath then the chapters get tagged, and I can see the chapters in Adobe DE. I've converted a couple Lit files, one of them split the book into separate HTML files for each Chapter, but no table of contents was created that Adobe DE could see. Is there something that needs to be done to make that happen? There are no linefeeds in the resulting html file, would be nice to stick in some line feeds after </p> just to make it easier to work with. Some text editors struggle with opening a file with a single line that long as well. |
![]() |
![]() |
![]() |
#461 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,382
Karma: 27756918
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
css handling has already been changed in calibre, but those changes wont be released until 0.6.0 If you're comfortable using the development version of calibre, you could check out the new code.
As for chapter detection, chapter detection works the same no matter what type of source file you have. You just need to adjust the XPath expression accordingly. And note that calibre split HTML files on page breaks not neccessarily on chanpters. By default it inserts page breaks before chapters, so you may not have realized this behavior. |
![]() |
![]() |
![]() |
#462 |
Junior Member
![]() Posts: 1
Karma: 10
Join Date: Apr 2009
Device: iPhone
|
Made a rookie mistake, all good now.
Many thanks to the creator of this fine program Last edited by Aztek; 04-27-2009 at 11:10 AM. |
![]() |
![]() |
![]() |
#463 |
Jeffrey A. Carver
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,355
Karma: 1107383
Join Date: Aug 2008
Location: Massachusetts, USA
Device: Lenovo Yoga Tab Plus, Droid phone, Nook HD+
|
Another ePub snafu:
Twice now I have converted (different) files from rtf to html to epub. One was a friend's book ms.; the other was an article from The Atlantic Monthly that I pasted from the online version. The text converts okay, but for some reason Calibre keeps attaching an unrelated book cover to the converted files--the cover for a Cordwainer Smith book that I bought from Baen over a month ago, and which I don't think I performed any conversions on, though I might have corrected the metadata. I'm attaching the epub here, and also the source zip file. I note that the incorrect cover image is included in the zip file, so somehow when I add these files to the Calibre library, the bogus cover is getting picked up. Also, you will note in the epub file, that hyphens (in the context of names such as F-15) are being rendered weirdly. |
![]() |
![]() |
![]() |
#464 |
Jeffrey A. Carver
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,355
Karma: 1107383
Join Date: Aug 2008
Location: Massachusetts, USA
Device: Lenovo Yoga Tab Plus, Droid phone, Nook HD+
|
P.S. Just redid the epub conversion from the original RTF, and the cover problem didn't occur, but the hyphen problem did.
In a conversion to LRF, neither problem occurred. |
![]() |
![]() |
![]() |
#465 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,382
Karma: 27756918
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
The cover inclusion bug will be fixed in 0.6. The hyphen problem is a problem in the HTML itself. If you open the HTML in an edior, you will see that the hyphen character is not correctly encoded. This probably happened either when you pasted it into Word or converted from rtf to html
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Old Thread] Epub Output: Line Height | greenapple | Conversion | 20 | 01-27-2013 09:27 AM |
EPUB output justification | toki08 | Calibre | 10 | 01-08-2011 04:14 PM |
Calibre epub output details and Nook | squidward | Calibre | 6 | 11-24-2010 03:21 PM |
epub output metadata | troymc | Calibre | 5 | 05-22-2010 12:23 AM |
Problem with epub output in Cybook Gen3 | fjf | Calibre | 3 | 02-03-2010 02:23 AM |