|
|
#76 | |
|
Chalut o/
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 552
Karma: 718860
Join Date: Dec 2017
Device: Kobo
|
Quote:
@Kovid, I see what you want do by giving 1000 to the image, but I personally recommend transferring them and count them (and SVG) as block, and ignore them in the text. We coulnd underestimated the number of pages, but it would be better than overestimate. Especially since some ePubs also use "character images" like emojis, so giving them a virtual lenght of 1000 is a bad method for me. (especialy that image is "not a content" for me) Last edited by un_pogaz; 01-03-2026 at 03:47 AM. |
|
|
|
|
|
|
#77 | |
|
PC Dev
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 77
Karma: 583330
Join Date: Sep 2024
Device: Kindle Paperwhite (11th Gen), Lenovo Tab M10 (3rd Gen)
|
Quote:
if you have an idea what else could cause this, let me know edit: did the recount pages option to be sure and its doing it again, and only with epub it seems. kfx got removed normally, if i saw it correctly Last edited by bustacap; 01-03-2026 at 03:43 AM. |
|
|
|
|
|
|
#78 | |
|
Chalut o/
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 552
Karma: 718860
Join Date: Dec 2017
Device: Kobo
|
Quote:
Calibre Page normalize that. This is certainly inaccurate for anyones, but it a standadized average that can be used to compare books, based on their actual content. Last edited by un_pogaz; 01-03-2026 at 03:50 AM. |
|
|
|
|
|
|
#79 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 14,432
Karma: 244455419
Join Date: Jan 2014
Location: Estonia
Device: Kobo Sage & Libra 2
|
|
|
|
|
|
|
#80 | |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,837
Karma: 28586150
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Quote:
Last edited by kovidgoyal; 01-03-2026 at 03:58 AM. |
|
|
|
|
|
|
#81 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,837
Karma: 28586150
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
@unpogaz emojis are not counted as images unless for some reason the book is using actual images for emojis, they are usually just normal unicode characters and counted as such.
|
|
|
|
|
|
#82 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,837
Karma: 28586150
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Why not use the builtin facility for storing alternate covers in the data folder instead? Then you wont have this issue.
|
|
|
|
|
|
#83 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,837
Karma: 28586150
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
@bustacap: OK I'll take a look at it tomorrow unfortunately real life intrudes in my dev time today.
|
|
|
|
|
|
#84 | |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 14,432
Karma: 244455419
Join Date: Jan 2014
Location: Estonia
Device: Kobo Sage & Libra 2
|
Quote:
|
|
|
|
|
|
|
#85 |
|
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 590
Karma: 32228
Join Date: Feb 2012
Device: Onyx Boox Leaf
|
|
|
|
|
|
|
#86 | |
|
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 22,131
Karma: 30317706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
If I move them into data folders, I will also want to create a file link in a custom column (I have the column) to view them. BR |
|
|
|
|
|
|
#87 | |
|
Chalut o/
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 552
Karma: 718860
Join Date: Dec 2017
Device: Kobo
|
Quote:
Code:
<p>I'm happy <img src="smille_emoji.png"/></p> Code:
<p>paragraph paragraph</p> <div class="center"><img src="ornemental.png"/></div> <p>paragraph paragraph</p> I know that give a value of 1000 to img is to simulated a full page that the image can take, but ornemental image are much common, used several time inside a book, wich result to greatly over-estimate the book size. Not to mention the number of examples where the illustrative images do not take up the entire page. Personally, I much prefer to ignore the images and just treats them like special block that alway return a value of 1 line, and so that we count only the real character. And if the image is a full page, in the vast majorité des cas, is in a specific XHTML file wich is always count at least a 1 page. Yes, this risk to "underestimate" pages count, but it seems to me to underestimate image content than overestimate them. Maybe give to "get_num_of_significant_chars()" a optional argument for img etc. so we can control which value give to such special block depending of the context. The avantage of the algorithms that we have is we can teak it to have satisfactory and balanced behavior. |
|
|
|
|
|
|
#88 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,837
Karma: 28586150
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
1000 is under half a page. And no that smiley workaround isnt common enough to warrant consideration given with time it will get even less common, since there is no need for it anymore. Adjusting the algorithm should be done on the basis of evidence that its actually a problem. Are there a large number of books where using a value of 1000 causes very bad numbers and is this larger than the number of books where using 0 causes very bad numbers. Fake emoji I think we can safely dscount. What remains is dividers used between schenes/chapters and things like header images per chapter. Add half a page for each of these is not a bad tradeoff when in any imae heavy books, such as, say calibre news downloads, or technical books, or history books with images, it causes undercounts.
|
|
|
|
|
|
#89 |
|
Chalut o/
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 552
Karma: 718860
Join Date: Dec 2017
Device: Kobo
|
Yeah.
I probably think way too much about it. At least I raised my concern, subjet close. |
|
|
|
|
|
#90 | ||
|
Chalut o/
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 552
Karma: 718860
Join Date: Dec 2017
Device: Kobo
|
Quote:
No, probaly not. First one because it doesn't really make sense to have different algorithms for such similar format. And frankly, the ADE pages is not that great because it use the xhtml file size, wich lead to count also indent space and the tag itself. It not that much, but can be better. Quote:
On one hand, these file types are a hybrid between static like PDF and fully reflowable like ePub, so their page count has a sens... but since we cannot be reliable on it, yeah better to processes them as fully reflowable. Last edited by un_pogaz; 01-03-2026 at 10:28 AM. |
||
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| calibre 5: Beta testers needed | kovidgoyal | Calibre | 497 | 09-29-2020 01:58 AM |
| Beta testers needed | kovidgoyal | Calibre | 75 | 08-18-2019 08:00 PM |
| Beta testers for calibre 3.0 needed | kovidgoyal | Calibre | 598 | 07-09-2017 11:26 PM |
| Beta testers needed | kovidgoyal | Calibre | 54 | 05-20-2016 01:34 PM |
| Beta testers for calibre 2.0 needed | kovidgoyal | Calibre | 142 | 05-08-2015 05:44 AM |