How to narrow the bar code?
How to narrow the bar code?
(OP)
Hi, I'm new with PCL. I'm printing in small labels and even though it's been scanned correctly, the user wants to have enough blank space before and after the bar code prints in each label. The font setting before the bar code print is:
¬(s0p06h09v24700T
I changed it to ¬(s0p04h07v24700T but it's still same wide, it only decreased the height. Can anyone help me?
This is the complete esc sequence I have before the field bar code is printed: ¬(9Y¬&a124C¬(s0p06h09v24700T
where ¬ is the escape key.
Thanks,
---
¬(s0p06h09v24700T
I changed it to ¬(s0p04h07v24700T but it's still same wide, it only decreased the height. Can anyone help me?
This is the complete esc sequence I have before the field bar code is printed: ¬(9Y¬&a124C¬(s0p06h09v24700T
where ¬ is the escape key.
Thanks,
---
RE: How to narrow the bar code?
Print out a typeface list to see what is available and the appropriate PCL code to print it.
Is this a soft font or a font DIMM?
Jim Asman
http://www.spectracolorservices.com
RE: How to narrow the bar code?
RE: How to narrow the bar code?
Consider that a barcode at any given pitch may need to be printed taller or shorter depending on the requirement. If we only have the h to specify the size, then we have no way of selecting a different depth. This is why the v is needed in this case.
DansDad will explain,
Jim Asman
http://www.spectracolorservices.com
RE: How to narrow the bar code?
RE: How to narrow the bar code?
What printer are you using? Is the font built in, or is it a downloaded soft font?
Understand that the PCL string you are sending to the printer is a font SELECTION string. It in no way creates the font but simply tells the printer what you want. If the desired font is available that is what you will get; otherwise, the printer will substitute according to predefined priorities.
If there is not a suitable narrower barcode available, then there is NO PCL code that is going to help.
What barcode symbology is this?
Jim Asman
http://www.spectracolorservices.com
RE: How to narrow the bar code?
RE: How to narrow the bar code?
RE: How to narrow the bar code?
RE: How to narrow the bar code?
How to do this will vary slightly from device to device: many LaserJet printers have front panel menu systems via which such a printout can be initiated (usually via a 'Test' or 'Information' menu).
The printout should show which fonts are available, and should distinguish between 'locations': ROM-resident, DIMM fonts and downloaded soft fonts.
For each font, the list should show a 'skeleton' of the required font selection sequence.
If the indicated sequence shows SPECIFIC 'h' (pitch) AND 'v' (height) values, then the font is a fixed-pitch bitmap font, and is available only in the one size suggested by the given values; I'd expect the 'p' (spacing) value to be 0 (fixed-pitch).
If the sequence shows a SPECIFIC 'v' (height) value, then the font is almost certainly a proportionally-spaced bitmap font, and is again available only in the one size suggested by the given value; I'd expect the 'p' (spacing) value to be 1 (proportionally-spaced).
Otherwise, if the 'h' or 'v' value is represented by a 'placeholder' shaded box, this indicates that the font is scalable:
- if the 'p' (spacing) value is 0 (fixed-pitch), then the list should show that an 'h' (pitch) value (in characters-per-inch units) is appropriate;
- if the 'p' (spacing) value is 1 (proportionally-spaced), then the list should show that a 'v' (height) value (in (1/72 inch) point units) is appropriate.
The font selection sequence ({esc}(9Y{esc}&a124C{esc}(s0p06h09v24700T), which was originally quoted, implies that the font is a bitmap font - and is hence only available in that one size; the {esc}&a124C part is for horizontal cursor-positioning, and nothing to do with font selection.
IF the font IS scalable, then you will be able to select different sizes using 'h' or 'v' values (depending on whether the font is fixed-pitch or proportionally-spaced); any supplied, but non-relevant 'h' or 'v' value (as appropriate) will be stored in the printer's font select table, but otherwise ignored.
You may find that changing the size of a scalable font results in a barcode which is the required width, but is not tall enough; in this case, just repeat the data after adjusting the cursor position to the same horizontal value, but a larger vertical value.
As regards the comment about aspect ratios: you cannot vary the aspect ratio of a PCL5 font.
As webrabbit indicates, you can vary text aspect ratios with PostScript (but then PostScript is quite complex and powerful: more like a procedural programming language).
PCL6 also allows different 'scale' values to be set for vertical and horizontal scaling of text characters; but I wouldn't advise that you think of using this language unless you want to totally rewrite your print application.
RE: How to narrow the bar code?
This is the explanation I found:
A valid PCL escape sequence to select a barcode is like the following:
<<========================================================>>
<Esc>(s4p102h40v10,30b10,30s24670T
24670T Symbology: code 39, not encoding spaces before/after data
4p Readable text below bars, without start/stop chars(*)
102h Caption text in Univers Regular
40v Bars height: 40 points 40/72=0.555 inches
40*2.54/72=1.41 cm
10,30b Thin bars are 10 dots wide, thick bars are 30 dots wide
10,30s Thin spaces are 10 dots wide, thick spaces are 30 dots wide
<<========================================================>>
Of course I'm not using code 39, I am using 24700T symbology (which I still don't know how it is technically called, and I had to adjust the bars and white spaces to my own convenience.
Thank you DansDadUK, Jim, and Webrabbit for your help.
RE: How to narrow the bar code?
A full standard PCL5 font selection sequence, for the primary font, is of the following format:
{esc}(ID{esc}(s#p#h#v#s#b#T
where:
ID is the symbol set identifier (e.g. 0N, 19U,9Y)
#p indicates fixed or proportional Spacing
#h#v selects required Pitch and/or Height (as explained earlier)
#s indicates required Style (0=Upright; 1=Italic; etc.)
#b indicates required Stroke Weight (0=Regular; 3=Bold; etc.)
#T indicates required Typeface identifier.
The printer attempts to match the supplied characteristics to those of fonts it has resident (on ROM, DIMM, etc,) and chooses the one with the closest match; the characteristics have a priority order (as indicated in the above skeleton) although they don't have to be supplied in that order.
RE: How to narrow the bar code?
Jim Asman
http://www.spectracolorservices.com
RE: How to narrow the bar code?
Jim I tried the 4p, and the efect is as follows:
If the report prints the value '987654321' in bar code, then underneath the bars it will print the human readable text '987654321'.
RE: How to narrow the bar code?
As for I don't understand what you mean. Is this the barcode font which allows the human readable text underneath, or is it something else?
RE: How to narrow the bar code?
Well, #,#b#,#s for bars and whites means what I quoted above:
#,#b as in
10,30b Thin bars are 10 dots wide, thick bars are 30 dots wide
#,#s
10,30s Thin spaces are 10 dots wide, thick spaces are 30 dots wide
That's how we should manipulate the width of bars and white spaces in between bars until we get the width we want and also have them print sharp enough to be readable to the scanner.
RE: How to narrow the bar code?
RE: How to narrow the bar code?
RE: How to narrow the bar code?
RE: How to narrow the bar code?