Neodynamic Barcode Professional for Reporting Services
How to create barcodes that must fit a given size or area

IMPORTANT NOTE
The feature described below is for BARCODE CRI (Custom Report Item) component ONLY! If you are using Barcode DLL instead, then please go to "Class Reference" and look for FitBarsAreaWidth & FitBarsAreaHeight properties.

It's very common to need to create a barcode image in order it fits a given area, for instance: The barcode must fit an area of size 1.5 inch x 1 inch.

Barcode Professional CRI for Reporting Services lets you to accomplish this task by setting up the FitBarsAreaToSize property in the Visual Studio's Properties Window (figure 1) or through out the Barcode Builder form under Font & Format tab in the Image Settings section (figure 2).

Figure 1: FitBarsAreaToSize property
Figure 1: FitBarsAreaToSize property


Figure 2: The Width and Height of the target area in Barcode Builder
Figure 2: The Width and Height of the target area in Barcode Builder


NOTE
When you set up the FitBarsAreaToSize property it will take precedence over any change you make on other dimension properties such us BarWidth, BarHeight, etc. You must set up the FitBarsAreaToSize property to an empty value in order to disable the "fit to size" feature.

When you set up this target area values, Barcode Professional will automatically calculate the new dimensions for the barcode in order it fits the desired size. Keep in mind the following points about the target area:

The mentioned points want to mean that, for example, if you want to encode the data 1234567890 in Code 128 at 300DPI in order it fits an area of size 1.5 inch x 1 inch and you have set up a Quiet Zone Width of 0.1 inch, then you'll get the following barcode.




If you want to fulfill the whole target area with the barcode only, then you should just set up the QuietZoneWidth property to zero (in order to rid of the left and right margins) as is shown in the following figure.




Finally, keep in mind too that in some cases of high precision barcode generation, increasing the DPI property may be required.