Column to display number of pages for eBooks

I created File Type Group for eBooks with .pdf, .epub and .azw as part of it. How do I show the number of pages for these books in a column, at least for the .pdf and the .epub books and ideally for all three of them. The column for Pages available in Documents works only for Microsoft Word files.

For .pdf you can use ExifTool's PageCount tag, like here:

.epub and .azw don't have a standardized page size, so I am afraid you are out of luck.

I installed the Latest: v0.5.1 - Column.File_ExtendedEXIF.js.txt and also changed the path to point to exiftool.exe.

When I select the script columns to add to the lister, it does not have any PageCount as part of it.

I tried to see if I could figure out how to add the PDF column for PageCount to the Column.File_ExtendedEXIF.js.txt in Notepad++ but could not figure it out.

I also find in the exiftool documentation, that a lot of columns can be made available to Directory Opus through exiftool.

A bit more help on how to add these columns to the script file will be really helpful.

Thanking in advance,

Add this line to the list of columns in the script:

new Column("PageCount", "PDF", "PageCount", "PageCount", "right", "", null),

Insert it anywhere you want, just don't make it the last line (because of the ,).

I added the PageCount column as very first column before LensId.

I removed the script and added the saved script back to Directory Opus.

The Script Columns does show PageCount but not display any number in column.

I have changed the path for exiftool.exe to C:\ExifTool\exiftool.exe.
There are two files in this path exiftool(-k).exe and exiftool.exe. Both are same files. Just that exiftool(-k).exe was extracted and I copied it to exiftool.exe.

Some more observations
I tried the already existing Script Column Orientation and LensID for a .jpg file and still does not help as it does not show this either.

If I drag a PDF file on to the exiftool(-k).exe, it does show me PDF exif information in a command window.

Just to be sure, I also added pdf as extension to the Whitelist Extensions but it did not help either.

A file called .txt did get created in DO.ExtendedEXIF folder in %tmp%. This file does contain PageCount for the PDF

I will appreciate if you can help me why it is not showing any information in the Script Columns for PDF or even for a JPG within the listers.

Sounds like you did everything right. To reproduce the problem I removed all previous scripts from my system and installed a freshly downloaded script (via dragging onto the settings dialog).

Steps to get the column working:

  • set the path to exiftool.exe (via script dialog)
  • whitelist jpg (via script dialog)
  • insert colum definition (via editing /scripts\Column.File_ExtendedEXIF.js)
  • add column to lister

I ran out of ideas what to ask about your setup. Feel free to post screenshots, that might get my imagination going. Or maybe the script's author @tbone can enlighten us?

The only thing I find somehow different is default script path contains "/home/tb_tools\exiftool.exe" which looks more like Unix path to me than Windows one due to home and forward slashes.

I have the path set as C:\ExifTool\exiftool.exe.

On other hand, the path would have not caused any problem as per me otherwise there could not be any .txt file with metadata information in DO.ExtendedEXIF folder.

Some screen images if it helps.

Is there a column in File Explorer which shows the page count information you need for the same files? If so, importing the column into Opus can be done fairly easily with a short script. (It may depend on the PDF software installed, though.)

I have Adobe Reader installed and associated with PDF files.

File Explorer Pages does not work for PDF files.

It works only for Word Documents like DOC and DOCX. It does not even work for RTF files.

Here are two somewhat related links. Second one might help for DOPUS column but I am not sure how.

I do have pdfinfo.exe on my machine and it does show pages in PDF but not sure how if at all DOPUS can use this information.

Yes, but it's just an Opus alias. That part is alright.

The only odd thing I noticed is that your temp folder is on D:. That shouldn't be a problem, but maybe it is.

Try turning the "Keep Temp" feature off and/or hard code a path into the settings.

See the below thread. That works to show pages.