# OCR SDK Knowledge Base

Article ID: 1373 | Category: Licensing | Type: FAQ | Last Modified: 12/13/2016

## Page Counter Calculation

Description

How does the license page counter depends on the recognized page size?

Solution

License pages counter is decremented more than once for a single page in case physical size of this page exceeds physical size of A4 page.

Physical size (inch2) of your image is calculated as follows:

•  physical size of image = ( PageWidthPixel / HorizontalResolutionDPI ) * ( PageHeightPixel / VerticalResolutionDPI )

The number of pages to decrement is counted with this formula:

• n is always >= 1
• n = ~(physical size of image) / (physical size of A4 image), where
• physical size of A4 image = A4PrintHeightInch * A4PrintWidthInch

As you can see, the number of pages to decrement depends not only on resolution but on a ratio between size in pixels and resolution.

We would like to note that all calculations are done with integer variables, so there are some rounding nuances in favor of our users.

Example

Here is an example to try and make this calculation clearer.

If a page for example has the following attributes: Width = 3660 pixels, Height = 5163 pixels, XResolution = YResolution = 300 dpi.

So, physical width of each page is (3660/300) = 12 inch,  physical height of each page is (5163/300) = 17 inch, area of each page is 12*17 = 204 inch2 . And the page counter decreases by (204 inch2/97 inch2) = 2 times for this page, because the size of A4 page is (8,27 inches * 11,69 inches = 97 inch2).

After recognition of this one image the page counter decreases by 2.