ModuleSize Property

Navigation:  Reference Guide > Properties >

ModuleSize Property

Previous pageReturn to chapter overviewNext page

Sets the size (width/height) of the square-shaped module.

 

Property Data Type

float

 

 

Remarks

The default value is 0.07, internally our Aztec ASP control converts the module size from centimeters to pixels based on the device resolution, round up or round down float pixel value to the nearest integer.

 

The centimeter to pixel conversion formula is :

size_in_pixels = size_in_centimeters * device_resolution / 2.54

 

For example, if you render barcode on computer screen and the screen resolution is 96dpi.

 

(1) Set ModuleSize property to 0.04,  size_in_pixels = 0.04 * 96 / 2.54 = 1.5118, round up 1.5118 to 2, so actual module size is 2 pixels.

 

(2) Set ModuleSize property to 0.06,  size_in_pixels = 0.06 * 96 / 2.54 = 2.2677, round down 2.2677 to 2, so actual module size is 2 pixels.

 

(3) Set ModuleSize property to 0.07,  size_in_pixels = 0.07 * 96 / 2.54 = 2.6456, round up 2.6456 to 3, so actual module size is 3 pixels.

 

Different ModuleSize property values might end up with same module size in pixels due to performing rounding operations.