10.1. Creating Image based on Screen Resolution

With this approach the barcode image is created under screen resolution - 96 dpi. Since the IMG statement assumes the screen pixel size by default, you do not need to specify size in the IMG tag. At the time of print, the browser enlarges one screen pixel into several printer pixels. During the process, rounding errors are likely to happen because screen resolution is not compatible with resolutions of most printers. Nevertheless, that does not mean that the barcode quality will deteriorate. As long as the printer pixel is very small, an extra pixel does not affect the overall readability.

Our testing found that this approach works very well on high resolution printers even when the narrow element only occupies 1 screen pixel. On low-resolution thermal printers, when the value of NarrowBarWidth is equal to or greater than the width of two screen pixels (20 mils), the barcode quality is also pretty good.

The primary issue with this approach is that you have few choices on the NarrowBarWidth because the size has to align with screen pixels. For example, between 10 mils and 20 mils you can either go with 1 screen pixel (10 mils), or 2 screen pixels (20 mils). Although Barcode ActiveX accepts other values such as 16 mils, it creates the same barcode image as if you specify 20 mils.