You are viewing limited content. For full access, please sign in.

Question

Question

Query to see how many pages in repository are in color and black & white?

asked on January 7, 2020

Is there a way to search for how many pages are in black & white and how many pages are in color in a repository?  (Either in the Windows client or with a SQL query)  

 

Does the Laserfiche database even keep track of this in a table?  (Obviously the images are in the Windows folder which is the Laserfiche volume, so does the Laserfiche database even know if a document is in black and white or not?)  

0 0

Replies

replied on January 8, 2020

The dbo.doc table represents every page in your repository.  The img_bpp column is bit depth of that page.  1 is B&W, 8 is grayscale, 24 is color. 

Disclaimer: this is from memory and I might be wrong.

3 0
replied on January 9, 2020

Erik's answer works, with one caveat: this will only show you the counts for Laserfiche Pages (TIFF images) in the repository, but it does not reflect PDF pages that you haven't "Generated Pages" for in the repository (or any other kind of document, such as Excel, Word, etc.). To get a fully accurate count, you should first "Generate Laserfiche Pages" for all PDFs, then run the queries to get the numbers.

Erik was also accurate with the numbers: 1=Black&White, 8=Grayscale, and 24=Color. The following query will get you the full results...

USE [Your_DB_Name];
SELECT(
	SELECT COUNT(*)
		FROM doc WHERE img_bpp=1
		) AS 'B&W',
		(SELECT COUNT(*)
		FROM doc WHERE img_bpp=8
		) AS 'Grayscale',
		(SELECT COUNT(*)
		FROM doc WHERE img_bpp=24
		) AS 'Color'

 

1 0
replied on January 9, 2020 Show version history

I just tested out what Erik said, and without counting every page, it seems to be correct.

 

USE RepositoryDB
SELECT COUNT(page_id) AS 'B&W', (SELECT COUNT(page_id) FROM doc WHERE img_bpp = 8) AS Color FROM doc WHERE img_bpp = 24

 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.