Konica Minolta Darwin VDP Software User Manual

Page 84

Advertising
background image



Page 84 of 92

T EC - I T B a r c o d e So f t w a re R e f e re n c e

900 / 600 * 96 = 144 pixel

<img src="/images/barcode.png"

width="144"

height="60">

Please note:

When using such high resolution images you have to increase the font size for the barcode
to make the text look normal.

Linear barcodes:
To avoid large file sizes you can use a higher resolution in the horizontal dimension of the
barcode image only. Please note: This approach will produce distorted fonts. So switch off
the font in the barcode and print the text separately using HTML.

Instead of generating the barcode image for a dedicated printer resolution you can also
produce the barcode with twice or triple the resolution as displayed in the browser window.
This will produce a good approximation. With more detailed source images the rasterizing
errors are reduced and the printing quality is increased.

B.7.3

Optimizing Barcode Images with Respect to the Printer Resolution

Below we will describe a general approach for optimizing barcode images with respect to the printer
resolution. It can be used for all images which are going to be printed. This optimization is only
possible if you know the resolution of the target printer.

For optimization the following steps are required:

1.

Specify the intended size of the barcode on the printout.
Please keep in mind that due to the optimization the final barcode size will vary!
e.g.: barcode width = 5 cm

2.

Based on that size calculate the image size (in pixels) for the required printer resolution.
e.g.: printer resolution = 600 dpi
 5 cm / 2.54 1.97 inches
 Calculated image width = 1.97 * 600 1181 pixels

3.

Now check if the barcode fits the pixel raster of the image, or if it has to be optimized.
We assume our (linear) barcode uses a total of 101 modules

1

.

 Module width (in pixel) = 1181 / 101 11.7
 This module width cannot be represented with whole device pixels! The image has to be
optimized!

4.

Optimize the image.
In order that all bars and spaces can be represented with whole device pixels, we have to
use an integer value for the module width. Therefore the calculated pixel size has to be
rounded up or down.
 In our case we will round the module width down to 11 pixels (instead of 11.7). Therefore
the barcode will become a little smaller.
 The actual image width is now 11 * 101 = 1111 pixels.

5.

Based on that pixel size the actual barcode size on the printout can be calculated.
 1111 / 600 1.85 inches 4.7 cm

6.

For HTML only:
To print the barcode in the correct size, we have to calculate the width of the displayed
barcode in screen pixels:
 Therefore divide the image size by the printer resolution and multiply it by 96 dpi.
 1111 / 600 * 96 = 177.76 pixel
 In the HTML image tag you would specify a width of 178 pixels!

For code examples see sections B.9.1 and B.9.2!

1

The module count is the number of modules which is required for drawing the barcode. Example: If the barcode consists of

a bar, followed by a space and then followed by two bars (making one big bar) we would count 4 modules.
The module count can be retrieved using

CountModules

for linear barcodes and

2DXCols

for 2D barcodes.

Advertising