barcode in preview is different to printer output

regarding the VPE Report Engine and PDF Library

Moderator: IDEAL Software Support

barcode in preview is different to printer output

Postby IDEAL Software Support » Thu Nov 25, 2004 5:25 pm

A barcode is displayed correctly in the preview, but is not of the same size when printed. Is this a bug?

Answer:
VPE prints the bar codes in correct size. You need to know the following about barcodes, to understand it:

The width of the thin and thick modules (the black and white lines) have ratios, for example 1:2. This means, thin lines are half as thick as thick lines.
Example: a given barcode has 63 modules, 43 thick and 20 thin modules, and shall be painted into a rectangle which has a width of 10 cm.
The barcode library now computes the maximum width of a single module, so that all modules will best fit into the given rectangle while considering the rule, that the thin / thick ratio is 1:2. It can happen then, that there are wide gaps at the end of the barcode, because it can not fill the given rectangle.

The preview shows the barcode in the full rectangle, because when drawing to the preview, the barcode library ignores the ratio rule, otherwise - due to the low resolution of the screen - sometimes a barcode would not be shown at all or only in part.
IDEAL Software Support
 
Posts: 1621
Joined: Thu Nov 18, 2004 4:03 pm

Return to VPE Frequently Asked Questions

Who is online

Users browsing this forum: No registered users and 5 guests