P4 Software
/
BarcoderX English
Applies to: BarcoderX Basic and Ultimate
Status: Built, not yet released. The first part of the label engine exists and is tested, but nothing is released yet and there is nothing to download. It is the part of BarcoderX that every label passes through, and it is still being built. There is no released package, and the licensed engine will be the only public way to produce output. The engine makes the drawing of a label. The part that draws it and saves a PNG file is joined to the engine, and the label service uses both. The part that turns a picture into ZPL commands is joined to the engine, so a template becomes the commands of a whole label, sent to the printer as one picture (see ZPL output). Anything marked "planned" is not usable yet.
The label engine takes a template and makes the drawing of one label. It is the part of BarcoderX that decides where everything goes: it turns lengths into printer dots, lays out the text, the boxes and the barcodes, and writes down the drawing as a list of steps. This page says what the engine takes, what it gives back, what it draws today and what it leaves out, and what a program that hosts it must do to stay safe.
For one template, the engine does these things in this order:
The engine does not make pixels, a file or printer commands. What it makes is a list of drawing steps, in dots. See Drawing shapes for the list of drawing steps and the surfaces. The list stays inside BarcoderX: a program that calls the engine cannot read it, draw it itself or save it. The one public way from the engine to a picture is the PNG renderer, which takes the whole result of the engine and gives back a PNG file or the reason there is none. It is described in PNG output, and the label service runs it for you. The part that writes ZPL commands from a black-and-white picture is described in ZPL output. This is on purpose: nothing can draw a label without passing through the engine.
The smallest template on The label template format page, with one text, one box and one EAN-13 barcode, gives a label of 799 by 400 dots at 203 dots per inch. That is 100 mm by 50 mm, rounded to whole dots.
| Input | What it is |
|---|---|
| The template | The label design. The engine checks it itself, so a program that calls it does not have to. An invalid template gives messages and no drawing. The engine never throws an error for a template. |
| The resolution | The printer resolution to draw at, in dots per inch, from 96 to 1,200. If you give none, the engine uses the resolution of the template. |
| The limits | The most that one label may use. If you give none, the engine uses the defaults in the table below. |
A length written in millimeters, inches or points keeps its physical size when you draw at another resolution. A length written in dots is scaled in proportion to the two resolutions. Every edge is rounded to a whole dot, so a bar or a border never has a blurred edge. The next section gives the rule.
There is no fixed number of dots in a millimeter. A millimeter is exactly 1/25.4 inch, so at 203 dots per inch it is 203/25.4 dots, about 7.99 and not 8. For example, 10 mm at 203 dots per inch is 79.92 dots, and the engine rounds it to 80.
| Output | What it is |
|---|---|
| Succeeded or not | Whether a drawing was made for the whole label. It does not mean that every element is on it: an element that cannot be drawn is left out with a message. |
| The drawing | The list of drawing steps, with the origin at the top left, kept inside BarcoderX. A program cannot read it, but it can pass the whole result to the PNG renderer. When a label fails there is no drawing at all, never a part of the label, because a half label on a printer is worse than none. |
| The size | The width and height of the label in dots, for the surface that is drawn on. |
| The resolution | The resolution that the label was laid out at. |
| Counts | How many elements were drawn and how many were left out. |
| The messages | What the engine and the parts it uses have to report, in the order they were found. They are the diagnostic codes in Diagnostic codes. |
| The drawing limits | The limits that the drawing was made with. They stay inside BarcoderX with the drawing. |
The engine gives the same drawing for the same template and the same resolution. In BarcoderX's automatic tests, the fingerprint of the drawing of the smallest template at 203 and at 300 dots per inch is the same on Windows x64, Linux x64 and Linux arm64. Many labels can be made at the same time from different threads.
xDimension), BarcoderX rounds it to whole dots and tells you the width it used (BX3906). If you give none, the barcode fills its box with the largest whole-dot module that fits. The digits under the bars are drawn when the barcode has a humanReadable setting with below or above, and not otherwise. See Barcodes.The digits of an add-on are drawn above the add-on's bars. See UPC-E and add-on symbols.
When the digits under a barcode are wider than the space the barcode gives them, for example EAN-13 at 2 dots per module and a 10-point font, the engine makes them smaller. Every group of digits gets the same size, the largest at which the groups fit, and never less than 70 percent of the size you asked for. The 70 percent is a first choice that the builders made (builder's choice, owner confirmation pending). The engine reports the change once for the element (BX3412). If the digits still do not fit at that size, the engine does not cut or move them. They may overlap the quiet zone or the next group, and the engine says so once for the element (BX3915). To make them fit, use a wider module or a smaller font size on purpose.
A template can ask for things that the engine does not draw yet. It draws the rest of the label, and each omission comes with a message, so nothing disappears without a word:
stretch and scale, underline, strikeout and printer-resident fonts, the rules for when to print an element, computed properties, the back side of a page, the corner radius of each corner, the rounded corners of the box around a text, a different border width on each side of a rounded box, and the page settings for orientation and for several labels on one page.Other things are planned and not built: pictures, grids, repeaters, several labels on one page, and the printer's own text and barcode commands (the ZPL composer already sends the whole label as one picture: see ZPL output). The engine checks the license before anything is drawn. A license problem never stops a label: at worst the output carries the evaluation mark. See Evaluation mark and license keys.
BarcoderX checks every limit before it spends the resource it protects. A label that needs more than the limits allow is refused as a whole, and nothing is drawn (BX3909). A label that takes longer than the time limit is refused too (BX3910). The limits below are what the engine uses when you give none. A program that calls the engine can set lower ones, and it should for a public page.
Every number in this table, except where it says so, is a first choice that the builders made (builder's choice, owner confirmation pending). It has not been confirmed yet and can change before the first release.
| Limit | Default |
|---|---|
| Elements in a template | 2,000 (set by the plan; the limit of the template check) |
| Pixels of the label | 64,000,000 (64 megapixels; set by the plan) |
| Longest side of the label | 65,536 dots |
| Path segments in one fill | 1,000,000 (set by the plan) |
| Time to lay out and write one label | 2 seconds (set by the plan) |
| Characters of text in one element | 10,000 |
| Lines of text in one element | 500 |
| Characters of text in all elements of a label, digits under barcodes included | 50,000 |
| Path segments kept for all elements of a label (letters, rounded boxes, turned shapes) | 500,000, about 12.5 MB |
| Rectangles kept for all elements of a label (bars, borders, fills) | 100,000 |
| Work units of the drawing | 25,000,000 |
| Clips open at one time | 16 (the engine draws no clip yet) |
| Messages in one result | 500; the rest are counted and replaced by one warning, and the first and the latest error are always listed |
| Distance of an element from the label | 100,000,000 dots |
The limits of one text element are a quarter to a fifth of the defaults of the text library, and the label totals are chosen so that one label keeps about 12.5 MB of path segments at most.
The security reviews propose lower values for a page that anyone on the internet can use. They are first choices too (builder's choice, owner confirmation pending), and the owner decides.
| Limit | Proposed value |
|---|---|
| Elements in a template | 200 |
| Characters of text in one element | 2,000 |
| Lines of text in one element | 200 |
| Work units of the layout of one text | 2,000,000 |
| Characters of text in all elements of a label | 5,000 |
| Path segments kept for all elements of a label | 200,000 |
| Rectangles kept for all elements of a label | 20,000 |
| Messages in one result | 100 |
| Time to lay out and write one label | 1 second |
| Path segments in one fill | 100,000 |
| Pixels of a surface | 9,000,000 for a black-and-white printer picture, 2,500,000 for a color or gray preview |
| Longest side | 8,192 |
| Flattened edges | 400,000 (200,000 for a preview) |
| Work units of the drawing | 25,000,000 (10,000,000 for a preview) |
| Clips open at one time | 16 |
| Time for one render | 2 seconds at most |
| Size of a PNG file | 2,000,000 bytes |
| Resolution | 72 to 600 dots per inch |
A public page should also offer no font upload.
The engine is built to be safe for a program that hosts it. A host has duties of its own.
renderWork), so a label that is accepted is one that the renderer can finish. The renderer still gives back no picture at all, never a half-drawn one, if it is stopped for any other reason, because a half-drawn barcode must never reach a printer. A program that uses the renderer has nothing to discard, and nothing else can draw the engine's result. The work limit is a ceiling on the label itself. A label that carries the evaluation mark also gets an allowance for the mark, on top of the ceiling, in the limits that come back with the result, so the mark is always drawn complete and a label is accepted or refused the same way with or without the mark. On the largest page the allowance reaches about 7.9 million units, about a third of the 25,000,000 default, so an operator can count on it when setting the limit.LabelEngine.WarmUp() once at start. The first request of a process pays for work that is done only once: the first compilation of the code, the built-in font and the tables of the barcodes. That is about half a second on the development machine, and more on a small or busy one. The engine does that work itself before the time limit of the first request starts, so that request is not refused for it; calling WarmUp at start only moves the wait to a moment that you choose. The time limit is time on the clock, so a machine that is busy can still make a label slow enough to fail it. For a limit that does not depend on the speed of the machine, rely on the counted limits (BX3909). Work that a request chooses for itself, such as an uploaded font, is still counted in the time of that request.< written as \u003C. See The label template format.BarcoderX is a product of P4 Software.
Was this page helpful?