Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 03-07-2019, 04:49 PM   #1
r728626
Junior Member
r728626 began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Oct 2017
Device: pdf windows 7
Rename template for "number of pages"

Calibre has "number of pages" variable when I'm saving it?
I'm using default:
{authors:sublist(0,1,&)}({languages}), - {title} - {pubdate}

But in the reference page, there's even size but not page numbering
r728626 is offline   Reply With Quote
Old 03-07-2019, 04:54 PM   #2
ilovejedd
hopeless n00b
ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.
 
ilovejedd's Avatar
 
Posts: 3,553
Karma: 9000000
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, iPad 9.7, iPad 12.9
That's because the number of pages for reflowable formats vary (device, font face, font size, line height, margins, etc). I'm sure there's a plugin available to calculate the number of pages and store that value in a custom column.
ilovejedd is offline   Reply With Quote
Advert
Old 03-07-2019, 04:57 PM   #3
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 12,493
Karma: 10634266
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Calibre does not have a built-in 'number of pages' column.

The Count Pages plugin will calculate custom columns for number of pages, word counts and readability indices = see Index of plugins

BR

Last edited by BetterRed; 03-07-2019 at 04:59 PM.
BetterRed is offline   Reply With Quote
Old 03-07-2019, 05:40 PM   #4
r728626
Junior Member
r728626 began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Oct 2017
Device: pdf windows 7
Quote:
Originally Posted by BetterRed View Post
Calibre does not have a built-in 'number of pages' column.

The Count Pages plugin will calculate custom columns for number of pages, word counts and readability indices = see Index of plugins

BR
That takes a while. On windows there's a simple column which calculates a whole folder pages almost instantaneously.

To install a plugin, wait several minutes, it's not practical. Perhaps programmers can make this plugin a variable on calibre, so it can be performed more easily?
r728626 is offline   Reply With Quote
Old 03-07-2019, 06:11 PM   #5
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 12,493
Karma: 10634266
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by r728626 View Post
That takes a while. On windows there's a simple column which calculates a whole folder pages almost instantaneously.

To install a plugin, wait several minutes, it's not practical. Perhaps programmers can make this plugin a variable on calibre, so it can be performed more easily?
I could run Count Pages against my 130,000 book library with one keystroke (Alt+C), sure it'll take a while, but why would I do that?

I run Count Pages against a book when I add it to the library and the counts are in the database forever more.

Does Windows show page counts for EPUB, MOBI, ..., or TXT files ? Calibre can.

BR
BetterRed is offline   Reply With Quote
Advert
Old 03-07-2019, 06:55 PM   #6
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 16,218
Karma: 26150342
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo,Aura H2O,Glo HD,Aura ONE,Clara HD,Forma;tolino epos
Quote:
Originally Posted by r728626 View Post
That takes a while. On windows there's a simple column which calculates a whole folder pages almost instantaneously.
I don't think I've seen this. Are you saying that Windows will show a page count for epubs in Explorer? Did you need to add anything or change settings to see it?
davidfor is online now   Reply With Quote
Old 03-07-2019, 08:21 PM   #7
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 12,493
Karma: 10634266
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by davidfor View Post
I don't think I've seen this. Are you saying that Windows will show a page count for epubs in Explorer? Did you need to add anything or change settings to see it?
PDFs and DOCXs - not EPUBS, not even LRFs - but to be fair MS ditched LRF

BR
Attached Thumbnails
Click image for larger version

Name:	1.jpg
Views:	21
Size:	173.2 KB
ID:	170093  
BetterRed is offline   Reply With Quote
Old 03-07-2019, 08:43 PM   #8
r728626
Junior Member
r728626 began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Oct 2017
Device: pdf windows 7
Quote:
Originally Posted by BetterRed View Post
I could run Count Pages against my 130,000 book library with one keystroke (Alt+C), sure it'll take a while, but why would I do that?

I run Count Pages against a book when I add it to the library and the counts are in the database forever more.

Does Windows show page counts for EPUB, MOBI, ..., or TXT files ? Calibre can.

BR
This plugin is horrible for .pdfs
If it's a large file then, forget it. It's going to run the process for hours consuming CPU, and still hasn't been finished.
Windows took exactly 5 minutes. But it can't rename files, which is the whole reason behind the template feature.

I can't understand why this community is so unable to accept negative points in calibre, specially when it's about .pdf format.
Many .epubs are just trash .txt files.

This function must be worked better, because even windows can perform better than calibre. Perhaps some open-source renaming tags could do this using the windows engine, which I'm not aware.
But calibre, and even manually installing the plugin, hasn't been a solution for me.
r728626 is offline   Reply With Quote
Old 03-07-2019, 08:48 PM   #9
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 16,218
Karma: 26150342
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo,Aura H2O,Glo HD,Aura ONE,Clara HD,Forma;tolino epos
Quote:
Originally Posted by BetterRed View Post
PDFs and DOCXs - not EPUBS, not even LRFs - but to be fair MS ditched LRF
In that case it isn't comparable. Both formats almost definitely have the page count in metadata somewhere.
davidfor is online now   Reply With Quote
Old 03-07-2019, 09:05 PM   #10
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 22,757
Karma: 23579576
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: K4NT, Galaxy Tab A, Kobo Aura2
Quote:
Originally Posted by r728626 View Post
This plugin is horrible for .pdfs
If it's a large file then, forget it. It's going to run the process for hours consuming CPU, and still hasn't been finished.
Windows took exactly 5 minutes. But it can't rename files, which is the whole reason behind the template feature.

I can't understand why this community is so unable to accept negative points in calibre, specially when it's about .pdf format.
Many .epubs are just trash .txt files.

This function must be worked better, because even windows can perform better than calibre. Perhaps some open-source renaming tags could do this using the windows engine, which I'm not aware.
But calibre, and even manually installing the plugin, hasn't been a solution for me.
IMHO PDF is the trash format. It was made to be a Print Exactly the same everywhere format.
With a little effort on your part: Open in Adobe: Note page count (on toolbar): Enter that into Calibre (custom column)
theducks is offline   Reply With Quote
Old 03-07-2019, 09:07 PM   #11
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 16,218
Karma: 26150342
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo,Aura H2O,Glo HD,Aura ONE,Clara HD,Forma;tolino epos
Quote:
Originally Posted by r728626 View Post
This plugin is horrible for .pdfs
If it's a large file then, forget it. It's going to run the process for hours consuming CPU, and still hasn't been finished.
Whoops, forgot about something with this. It's incomplete. See the posts below for more in the story.

The Count Pages plugin does not calculate a page count for PDFs. If that is the only format you have in the library for a book, the plugin will display a message to tell you it cannot do the page count. It can do a word count, but it will need to extract the words from the PDF which does take time.
Quote:
Windows took exactly 5 minutes. But it can't rename files, which is the whole reason behind the template feature.
See above if you are talking about PDFs. If you are talking about other formats, please state what they are.
Quote:

I can't understand why this community is so unable to accept negative points in calibre, specially when it's about .pdf format.
The community is happy to discuss the negative points of calibre. But, so many of the points people put up turn out to be a misunderstanding. And the community completely understands that PDFs have good points. But, they also have bad points. These tend to get discussed more as people try to work around them.
Quote:
Many .epubs are just trash .txt files.
Not in my experience. I have many high quality, well formatted epubs. If you are only looking at epubs from places like Project Gutenberg, then I can under that viewpoint. But, there are also a lot of PDFs that are "just trash .txt files.".
Quote:

This function must be worked better, because even windows can perform better than calibre. Perhaps some open-source renaming tags could do this using the windows engine, which I'm not aware.
But calibre, and even manually installing the plugin, hasn't been a solution for me.
In that case, it doesn't sound like calibre is for you. And there are a lot of people that don't like it for one reason or another. But, a really important thing is to make sure you are comparing the same thing. At the moment, you sound like you are comparing a plugin that counts pages in epubs to something that counts pages in a PDF. The requirements are vastly different.

Last edited by davidfor; 03-07-2019 at 11:02 PM. Reason: Added a correction.
davidfor is online now   Reply With Quote
Old 03-07-2019, 10:23 PM   #12
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 12,493
Karma: 10634266
Join Date: Mar 2012
Location: Sydney Australia
Device: none
From the Count Pages first Post - end of para #4

. . . the configuration you can choose to use the page count used by the calibre e-book viewer, or you can use the Aobe algorithm used by their ADE software and some devices like a Nook. However if the format being counted is a PDF, then as of v1.4.2 there is now a special optimisation to read the actual page count rather than estimating it using any of the above algorithms.

. . .

And from the Count Pages Version Log

Version 1.4.2 - 31 May 2012
Minimum version set to calibre 0.8.54
Optimisation for counting pages for PDFs to read the page count from the PDF info rather than estimating it


Zo, i just did a small test with 7 PDFs of various provenance - here are the results

Click image for larger version

Name:	2.jpg
Views:	18
Size:	48.1 KB
ID:	170095

The numbers in the Titles are from File Explorer/XChange Document Properties. The Have Read indicates if Count pages got the right answer. Books 2 & 4 are rubbish documents that I created with a online Form layout tool, I can't explain the first one (A 4 D) - if anyone wants that PDF to take a look at what's going on let me know.

The bottom line is that Count Pages does not handle PDFs by converting it to a reflowable format, it gets the page count from the same place as File Explorer - most of the time Ψ³

BR
BetterRed is offline   Reply With Quote
Old 03-07-2019, 10:36 PM   #13
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 12,493
Karma: 10634266
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by r728626 View Post
Perhaps some open-source renaming tags could do this using the windows engine, which I'm not aware.
But calibre, and even manually installing the plugin, hasn't been a solution for me.
Calibre is open source, the code is available from GitHub, see Get involved on the Home page.

The optional plugins, such as CP, are delivered as source code. People with access to the requisite skills can open them up and modify them for their specific use case.

BR
BetterRed is offline   Reply With Quote
Old 03-07-2019, 10:49 PM   #14
r728626
Junior Member
r728626 began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Oct 2017
Device: pdf windows 7
For me it's not practical, for the amount of time wasted and CPU usage. While Windows can perform this on 5 seconds, for a 1000 page .pdf of 100mb.
r728626 is offline   Reply With Quote
Old 03-07-2019, 10:53 PM   #15
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 16,218
Karma: 26150342
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo,Aura H2O,Glo HD,Aura ONE,Clara HD,Forma;tolino epos
Quote:
Originally Posted by BetterRed View Post
From the Count Pages first Post - end of para #4

[INDENT]. . . the configuration you can choose to use the page count used by the calibre e-book viewer, or you can use the Aobe algorithm used by their ADE software and some devices like a Nook. However if the format being counted is a PDF, then as of v1.4.2 there is now a special optimisation to read the actual page count rather than estimating it using any of the above algorithms.
And for some reason, if the algorithm chosen is the ADE version, it will give an error that there is no suitable format if PDF is the only one available. That's what I saw earlier and didn't think to change the algorithm. I'll have to check the code to see if there is a hint why, but I think it is wrong. I don't know if ADE will display PDF, but the Adobe RMSDK based ereaders will and they would not be calculating the page count using the algorithm used for epubs. Or do they of the ereader supports PDF reflow?
davidfor is online now   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
"Add a book" template like "Save to disk"? vr8ce Library Management 10 06-09-2017 08:16 AM
Any way to show "printed" book pages number? datanoise KOReader 3 09-01-2016 10:48 AM
hierarchy feature using rough "Dewey number" instead of "genre" - multiple DDCs? kite Library Management 4 10-13-2014 09:53 AM
I found references to "PRIME_EBOOKS" and "kindle-video-slate" on Amazon pages! nick541 Amazon Kindle 7 09-26-2011 02:56 PM
Kindle DX optimal "page" size - PDF or Word template guiyoforward Amazon Kindle 12 09-28-2010 07:05 PM


All times are GMT -4. The time now is 09:26 PM.


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