Konica Minolta Darwin VDP Software User Manual

Page 83

Advertising
background image



Page 83 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

B.7.1

Embedding Barcode Images

In general, barcode images are used in order to embed a barcode into arbitrary layouts (e.g. on a
HTML page, in a desktop publishing program, in a report generator, etc.).

Therefore you usually specify a rectangular region on the layout in which the image will be inserted.
This rectangular region defines the size (in device independent units like mm) in which the barcode
will be printed. (Only exception: In HTML you specify the actual printout size indirectly via screen
pixels. Nonetheless this pixel size can be translated to a specific target size on your printout

– for

details see section B.7.2.)

Now, the basic principle is that the printout will always have exactly the same size as specified in
the layout. The size of the embedded source image actually does not have any influence on the
printout size. However, the quality of the printout will vary depending on different source image
dimensions!

Therefore you should ideally always

Create the image exactly in the same resolution as used for printing (printer resolution).

If you do not know in which resolution the barcode image will be printed, use a sufficiently
high resolution, so that the image is likely to printed in an aspect ratio of 1:1 or that it is being
down-scaled for printing (down-scaling a large image usually produces better results on the
printout than up-scaling a smaller image).

B.7.2

Barcode Images in HTML

As already stated above, the basic idea for generating high quality barcode printouts is to generate
detailed barcode images which are optimized for a specific printer resolution. This approach can
also be used for HTML. The high resolution images are only scaled down for display in the browser
window. Internally the images keep their high resolution. Thus the browser can generate more
accurate printouts compared to using source images in a low screen resolution.

To specify the dimension in which the barcode will be displayed on the HTML page you can use the
image attributes

“width” and “height”. These attributes specify the display size of images on the

screen. Within the HTML code this would look like:

<img src="/images/barcode.png" width="250" height="60">

The screen size of the barcode image does not only specify the size in which the barcode is dis-
played in the browser window, it also specifies the size in which the barcode will be drawn on the
printout. For translation you need to know:

All images which are displayed in the web browser are assumed to have a resolution of 96
dpi. Based on that resolution the size on the printout is calculated. This calculation is inde-
pendent of the printer resolution.

Example:

If a barcode image is displayed with 200 pixels it will appear on your printout with a size of about 53
mm (200 pixels / 96 dpi 2.083 inches 52.91 mm).

This means: In order to make sure that the barcode has the correct size on the printout you have to
calculate the pixel size that is required for 96 dpi. Therefore divide the size (of the high resolution
image) by the printer resolution and then multiply it by 96 dpi. This value must be

used as “width”

(or as “height”) attribute for the image.

Example:

Image width = 900 pixel
Printer resolution = 600 dpi

Advertising