Can I use the same template for printing barcodes on 203 DPI and 300 DPI?

Can I use the same template for printing barcodes on 203 DPI and 300 DPI?


Problem Explanation:
When a template containing multiple barcodes is configured on 300 DPI, printing it on a 203 DPI printer may result in barcodes being rendered at varying sizes. While this generally does not cause significant problems, it can occasionally lead to overlaps or other printing irregularities that may compromise the clarity and effectiveness of the final product. It is important to be aware of this potential discrepancy to ensure the highest quality output. You might experience, that barcodes written on a 203 DPI printer is larger than on a 300 DPI printer.

The reason:
The reason why the barcode width depends on the printer resolution is, that the module width (line width) of the barcodes are always rounded up to the smallest whole number of dots. The dots have these measurements:

1 dot in 203 dpi is (1/203) = 0.0049 inch wide

1 dot in 300 dpi is (1/300) = 0.0033 inch wide

To circumvent this issue, we recommend the following effective strategies:

Create barcodes with a module width which is the same in 203 and 300 DPI

When you create a barcode in InterFormNG2 you set the module width in 1/1000 of an inch and this measurement will be rounded up to a whole number of dots in whatever printer resolution, that is used.
If you on the barcode state any of these module widths, then the barcode will be the about the same size in both 203 and 300 DPI:
Selected module width (1/1000")
Actual module width in 203 DPI (in inches)
Actual module width in 300 DPI (in inches)
7, 8 or 9
0.01
0.01
17, 18 or 19
0.02
0.02
27, 28 or 29
0.03
0.03
37, 38 or 39
0.04
0.04
47, 48 or 49
0.05
0.05

Create separate templates for each DPI

  • This ensures that barcodes are optimized for the specific resolution of the printer. While it requires maintaining two templates, it provides precise control over the output.
  • In each template you must adjust the sizing of the barcodes so the rendered result is the same.

Switch to driver print or PDF Printing

  • By changing the printer to driver printing, barcodes will automatically resize according to the printer’s capabilities.
  • Alternatively, if the printer supports PDF, you can use PDF printing to ensure proper scaling

Define DPI in the Workflow and Reference it in the Template

  • You can set the DPI as a variable in the workflow and reference it in the template. For example, you could use $interformng.printerResolution to dynamically adjust the barcode size based on the printer’s resolution.
  • Ensure each barcode is sized correctly within the template.