WebToEpub icon indicating copy to clipboard operation
WebToEpub copied to clipboard

Calibre - Images are cut between pages in 2 pages mode

Open typhoon71 opened this issue 8 years ago • 23 comments

Yeah, I know what you guys are going to say... but I still need to report this one. Basically IU experience this:

glitch

Calibre bugtracker has this entry "https://bugs.launchpad.net/calibre/+bug/1293102", but it's tagged as "wontfix"; would it be possible to "fix" it on this side? I don't know if the solution suggested in that post will impact the /div removing thing. webtopdf is 0009 on chrome.

Strange thing is I remember it working flawlessy, and I didn't update calibre after that since I just updated it before.

typhoon71 avatar Jul 07 '16 12:07 typhoon71

I can confirm that setting images' width and height to 95% instead of 100% as said in the bug report fixes it. 99% also does, but when there're multiple successive images like in the gallery, unwanted blank pages will appear.

`

<svg xmlns="http://www.w3.org/2000/svg" height="95%" preserveAspectRatio="xMidYMid meet" version="1.1" viewBox="0 0 1103 1600" width="95%" xmlns:xlink="http://www.w3.org/1999/xlink">
`

That's interesting. I've never thought about this solution.

Screenshot: 100%, 95%.

dreamer2908 avatar Jul 07 '16 12:07 dreamer2908

Hmm. Looks like I could class it as part of this. https://github.com/dteviot/WebToEpub/issues/12

dteviot avatar Jul 07 '16 20:07 dteviot

I suppose everyone can see it, but while I wrote "2 page mode" my screenshot is from the page mode, single page since the window was half screen large. The important thing is that I was in "page" mode, not "flow" mode, which obviously behaves differently.

typhoon71 avatar Jul 07 '16 20:07 typhoon71

@dreamer2908 @typhoon71 I've changed the height to 95%, and with lastest version (0.0.0.10) you can manually modify the stylesheet. i.e. add a "page-break-before: always;" to the stylesheet.

Please let me know if this helps.

dteviot avatar Jul 10 '16 04:07 dteviot

Kudos for the moddable stylesheet, well tought option. I will test 0.0.0.10 later, it seems BakaTsuki has database issues right now... (the addon seems to be getting files anyway, but I prefer not "risking" a false positive)

typhoon71 avatar Jul 10 '16 08:07 typhoon71

@dteviot OK. I tested version 0.0.0.10. In short, it works. But I suggest keeping the cover image at 100% since it isn't affected by the issue.

Unrelated notes: I personally dislike landscape image getting the whole page, especially when there're text around it. Normal img tag with width="100%" looks nicer, like this. Maybe it's just me.

dreamer2908 avatar Jul 10 '16 16:07 dreamer2908

mmm, here BakaTsuki still showing "Sorry! This site is experiencing technical difficulties." But I suppose WebToEpub still works. Anyway, +1 to keeping the cover image at 100%. Small note: the images now are not centered vertically, I suppose because of the -5%; is there any way to center them?

typhoon71 avatar Jul 10 '16 16:07 typhoon71

Cover image noted.

Getting images to work properly in all cases is not easy. I'm still investigating the matter. However, I'm hopeful I can do something about the blank pages. Which is https://github.com/dteviot/WebToEpub/issues/28

dteviot avatar Jul 10 '16 19:07 dteviot

Hi again. I actually agree to removing the 100% height property as its no longer needed (it was more of a quick fix to a bigger problem, which was the bulleted image points). @dteviot which was fixed when we moved them out of the gallery (i forgot to remove the height property, Sorry >.<).

belldandu avatar Jul 12 '16 01:07 belldandu

Hi again. I actually agree to removing the 100% height property as its no longer needed

I'm not sure that's correct. Lord Simon, who wrote the older EPUB version is the one who told me to use 100% height. Anyway, I'm looking into (well, Googling) the recommended way to handle images in EPUB.

dteviot avatar Jul 12 '16 04:07 dteviot

100% height should be the way to go, it also is better looking. So if it's possible to have 100% height now that the spacing issue is fixed I agree with it too.

typhoon71 avatar Jul 12 '16 05:07 typhoon71

woopsie wrong issue.

belldandu avatar Jul 12 '16 19:07 belldandu

@typhoon71 One more change on the Experimental Tag branch. Can now set to use <img> tags rather than <svg><image>. (It's on the advanced options.) This might help with image splitting.

dteviot avatar Sep 25 '16 04:09 dteviot

Image splitting still occurs even if you use <img> tags. When you generate the file, modify the default height and width of <img> tags to 90% in the stylesheet. It's a calibre bug, and the only way to fix it is to keep height and width below 95%

toshiya44 avatar Sep 25 '16 04:09 toshiya44

I think it should be reported to calibre, but by someone that has a better understanding of the matter than myself, as I could just explain what happens.

typhoon71 avatar Sep 25 '16 07:09 typhoon71

@toshiya44 thanks for the confirmation. @dteviot any chance you have some time to submit a ticket to calibre

belldandu avatar Nov 03 '16 08:11 belldandu

@belldandu No, I have not submitted a bug report to calibre. I also haven't done any work for the last couple of weeks due to my Home PC experiencing a critical existence failure. All going well, should have a new PC in 2 to 3 weeks.

I'm thinking the way to fix this problem is to put each large image on it's own file/page, as is done with covers. Unfortunately, this is not quite as simple to do as it sounds.

dteviot avatar Nov 03 '16 18:11 dteviot

Oh yikes your having the same problem as me pc wise. Although i have no way of replacing mine.

belldandu avatar Nov 03 '16 18:11 belldandu

@dteviot yep on my side I'm doing this for every epub, I separate every image on it's own page if there is successive image since I had problem with this on google play book and sometimes on iBook

AzSiAz avatar Nov 05 '16 13:11 AzSiAz

@AzSiAz

I separate every image on it's own page if there is successive image

Do you do that manually or do you have code? If you have code, can I have a copy please? If you do it manually, can you walk me through the steps you use? Because I'll want to write code to do same thing.

dteviot avatar Nov 07 '16 18:11 dteviot

Never write code for this unfortunately, otherwise I'm just using calibre since it's easier this way

AzSiAz avatar Nov 08 '16 10:11 AzSiAz

@AzSiAz

I'm just using calibre since it's easier this way

please tell me the steps you take to do this.

dteviot avatar Nov 08 '16 18:11 dteviot

I'd like to know how you do it too. I started using the calibre editor instead of sigil so you'll make two pigeons happy with only one popcorn!

typhoon71 avatar Nov 08 '16 20:11 typhoon71