]> git.sur5r.net Git - glabels/blob - barcode-0.98/doc/barcode.info
Imported Upstream version 2.2.8
[glabels] / barcode-0.98 / doc / barcode.info
1 This is barcode.info, produced by makeinfo version 4.0b from
2 barcode.texinfo.
3
4    This file is the User's Manual for the barcode library (version
5 0.98).
6
7 \1f
8 File: barcode.info,  Node: Top,  Next: Overview,  Prev: (dir),  Up: (dir)
9
10 Barcode tools
11 *************
12
13    This file documents version 0.98 of the barcode library and sample
14 programs (March 2002).
15
16 * Menu:
17
18 * Overview::
19 * The Barcode Object::
20 * Supported Flags::
21 * The API::
22 * The barcode Executable::
23 * Supported Encodings::
24 * PCL Output::
25 * Bugs and Pending Issues::
26
27 \1f
28 File: barcode.info,  Node: Overview,  Next: The Barcode Object,  Prev: Top,  Up: Top
29
30 Overview
31 ********
32
33    The "barcode" package is mainly a C library for creating bar-code
34 output files. It also includes a command line front-end and (in a
35 foreseeable future) a graphic frontend.
36
37    The package is designed as a library because we think the main use
38 for barcode-generation tools is inside more featured applications. The
39 library addresses bar code printing as two distinct problems: creation
40 of bar information and actual conversion to an output format. To this
41 aim we use an intermediate representation for bar codes, which is
42 currently documented in the `ps.c' source file (not in this document).
43
44    Note that the library and the accompanying material is released
45 according to the GPL license, not the LGPL one. A copy of the GPL is
46 included in the distribution tarball.
47
48 \1f
49 File: barcode.info,  Node: The Barcode Object,  Next: Supported Flags,  Prev: Overview,  Up: Top
50
51 The Underlying Data Structure
52 *****************************
53
54    Every barcode-related function acts on a data structure defined in
55 the `barcode.h' header, which must be included by any C source file
56 that uses the library. The header is installed by make install.
57
58    The definition of the data structure is included here for reference:
59
60      struct Barcode_Item {
61          int flags;         /* type of encoding and other flags */
62          char *ascii;       /* malloced */
63          char *partial;     /* malloced too */
64          char *textinfo;    /* information about text placement */
65          char *encoding;    /* code name, filled by encoding engine */
66          int width, height; /* output units */
67          int xoff, yoff;    /* output units */
68          int margin;        /* output units */
69          double scalef;     /* requested scaling for barcode */
70          int error;         /* an errno-like value, in case of failure */
71      };
72
73    The exact meaning of each field and the various flags implemented are
74 described in the following sections.
75
76    Even though you won't usually need to act on the contents of this
77 structure, some of the functions in the library receive arguments that
78 are directly related to one or more of these fields.
79
80 * Menu:
81
82 * The Field List::
83 * The Intermediate Representation::
84
85 \1f
86 File: barcode.info,  Node: The Field List,  Next: The Intermediate Representation,  Prev: The Barcode Object,  Up: The Barcode Object
87
88 The Fields
89 ==========
90
91 `int flags;'
92      The flags are, as you may suspect, meant to specify the exact
93      behaviour of the library. They are often passed as an argument to
94      barcode functions and are discussed in the next section.
95
96 `char *ascii;'
97 `char *partial;'
98 `char *textinfo;'
99 `char *encoding;'
100      These fields are internally managed by the library, and you are
101      not expected to touch them if you use the provided API. All of
102      them are allocated with malloc.
103
104 `int width;'
105 `int height;'
106      They specify the width and height of the active barcode region
107      (i.e., excluding the white margin), in the units used to create
108      output data (for postscript they are points, 1/72th of an inch,
109      0.352 mm). The fields can be either assigned to in the structure
110      or via Barcode_Position(), at your choice.  If either value or
111      both are left to their default value of zero, the output engine
112      will assign default values according to the specified scaling
113      factor. If the specified width is bigger than needed (according to
114      the scaling factor), the output barcode will be centered in its
115      requested region. If either the width of the height are too small
116      for the specified scale factor, the output bar code will expand
117      symmetrically around the requested region.
118
119 `int xoff;'
120 `int yoff;'
121      The fields specify offset from the coordinate origin of the output
122      engine (for postscript, position 0,0 is the lower left corner of
123      the page).  The fields can be either assigned to in the structure
124      or via Barcode_Position(), at your choice.  The offset specifies
125      where the white margin begins, not where the first bar will be
126      printed. To print real ink to the specified position you should
127      set margin to 0.
128
129 `int margin;'
130      The white margin that will be left around the printed area of the
131      bar code. The same margin is applied to all sides of the printed
132      area. The default value for the margin is defined in `barcode.h'
133      as BARCODE_DEFAULT_MARGIN (10).
134
135 `double scalef;'
136      The enlarge or shrink value for the bar code over its default
137      dimension. The width and scalef fields interact deeply in the
138      creation of the output, and a complete description of the issues
139      appears later in this section.
140
141 `int error;'
142      The field is used when a barcode function fails to host an
143      errno-like integer value.
144
145 Use of the width and scalef fields.
146 -----------------------------------
147
148    A width unit is the width of the thinnest bar and/or space in the
149 chosen code; it defaults to 1 point if the output is postscript or
150 encapsulated postscript.
151
152    Either or both the code width and the scale factor can be left
153 unspecified (i.e., zero). The library deals with defaults in the
154 following way:
155
156 Both unspecified
157      If both the width and the scale factor are unspecified, the scale
158      factor will default to 1.0 and the width is calculated according
159      to the actual width of the bar code being printed.
160
161 Width unspecified
162      If the width is not specified, it is calculated according to the
163      values of scalef.
164
165 Scale factor unspecified
166      If the scale factor is not specified, it will be chosen so that
167      the generated bar code exactly fits the specified width.
168
169 Both specified
170      The code will be printed inside the specified region according to
171      the specified scale factor. It will be aligned to the left.  If,
172      however, the chosen width is too small for the specific bar code
173      and scaling factor, then the code will extend symmetrically to the
174      left and to the right of the chosen region.
175
176 \1f
177 File: barcode.info,  Node: The Intermediate Representation,  Prev: The Field List,  Up: The Barcode Object
178
179 The Intermediate Representation
180 ===============================
181
182    The encoding functions print their output into the partial and
183 texinfo fields of the barcode data structure. Those fields, together
184 with position information, are then used to generate actual output.
185 This is an informal description of the intermediate format.
186
187    The first char in partial tells how much extra space to add to the
188 left of the bars. For EAN-13, it is used to leave space to print the
189 first digit, other codes may have '0' for no-extra-space-needed.
190
191    The next characters are alternating bars and spaces, as multiples of
192 the base dimension which is 1 unless the code is rescaled. Rescaling is
193 calculated as the ratio from the requested width and the calculated
194 width.  Digits represent bar/space dimensions. Lower-case letters
195 represent those bars that should extend lower than the others: 'a' is
196 equivalent to '1', 'b' is '2' and so on up to 'i' which is equivalent to
197 '9'. Other letters will be used for encoding-specific meanings, as soon
198 as I implement them.
199
200    The textinfo string is made up of fields %lf:%lf:%c separated by
201 blank space. The first integer is the x position of the character, the
202 second is the font size (before rescaling) and the char item is the
203 character to be printed.
204
205    Both the partial and textinfo strings may include "-" or "+" as
206 special characters (in textinfo the char should be a stand-alone word).
207 They state where the text should be printed: below the bars ("-",
208 default) or above the bars. This is used, for example, to print the
209 add-5 and add-2 codes to the right of UPC or EAN codes (the add-5
210 extension is mostly used in ISBN codes).
211
212 \1f
213 File: barcode.info,  Node: Supported Flags,  Next: The API,  Prev: The Barcode Object,  Up: Top
214
215 The Flags
216 *********
217
218    The following flags are supported by version 0.98 of the library:
219
220 `BARCODE_ENCODING_MASK'
221      The mask is used to extract the encoding-type identifier from the
222      flags field.
223
224 `BARCODE_EAN'
225 `BARCODE_UPC'
226 `BARCODE_ISBN'
227 `BARCODE_128B'
228 `BARCODE_128C'
229 `BARCODE_128'
230 `BARCODE_128RAW'
231 `BARCODE_39'
232 `BARCODE_I25'
233 `BARCODE_CBR'
234 `BARCODE_MSI'
235 `BARCODE_PLS'
236 `BARCODE_93'
237      The currently supported encoding types: EAN (13 digits, 8 digits,
238      13 + 2 add-on and 13 + 5 add-on), UPC (UPC-A, UPC-E, UPC-A with 2
239      or 5 digit add-on), ISBN (with or without the 5-digit add-on),
240      CODE128-B (the whole set of printable ASCII characters), CODE128-C
241      (two digits encoded by each barcode symbol), CODE128 (all ASCII
242      values), a "raw-input" pseudo-code that generates CODE128 output,
243      CODE39 (alphanumeric), "interleaved 2 of 5" (numeric), Codabar
244      (numeric plus a few symbols), MSI (numeric) and Plessey (hex
245      digits).  *Note Supported Encodings::.
246
247 `BARCODE_ANY'
248      This special encoding type (represented by a value of zero, so it
249      will be the default) tells the encoding procedure to look for the
250      first encoding type that can deal with a textual string.
251      Therefore, a 11-digit code will be printed as UPC (as well as
252      6-digit, 11+2 and 11+5), a 12-digit (or 7-digit, or 12+2 or 12+5)
253      as EAN13, an ISBN code (with or without hyphens, with or without
254      add-5) will be encoded in its EAN13 representation, an even number
255      of digits is encoded using CODE128C and a generic string is
256      encoded using CODE128B. Since code-39 offers a much larger
257      representation for the same text string, code128-b is preferred
258      over code39 for alphanumeric strings.
259
260 `BARCODE_NO_ASCII'
261      Instructs the engine not to print the ascii string on output. By
262      default the bar code is accompanied with an ascii version of the
263      text it encodes.
264
265 `BARCODE_NO_CHECKSUM'
266      Instructs the engine not to add the checksum character to the
267      output. Not all the encoding types can drop the checksum; those
268      where the checksum is mandatory (like EAN and UPC) just ignore the
269      flag.
270
271 `BARCODE_OUTPUT_MASK'
272      The mask is used to extract the output-type identifier from the
273      flags field.
274
275 `BARCODE_OUT_PS'
276 `BARCODE_OUT_EPS'
277 `BARCODE_OUT_PCL'
278 `BARCODE_OUT_PCL_III'
279      The currently supported encoding types: full-page postscript and
280      encapsulated postscript; PCL (print command language, for HP
281      printers) and PCL-III (same as PCL, but uses a font not available
282      on older printers).
283
284 `BARCODE_OUT_NOHEADERS'
285      The flag instructs the printing engine not to print the header and
286      footer part of the file. This makes sense for the postscript
287      engine but might not make sense for other engines; such other
288      engines will silently ignore the flag just like the PCL back-end
289      does.
290
291 \1f
292 File: barcode.info,  Node: The API,  Next: The barcode Executable,  Prev: Supported Flags,  Up: Top
293
294 Functions Exported by the Library
295 *********************************
296
297    The functions included in the barcode library are declared in the
298 header file barcode.h.  They perform the following tasks:
299
300 `struct Barcode_Item *Barcode_Create(char *text);'
301      The function creates a new barcode object to deal with a specified
302      text string.  It returns NULL in case of failure and a pointer to
303      a barcode data structure in case of success.
304
305 `int Barcode_Delete(struct Barcode_Item *bc);'
306      Destroy a barcode object. Always returns 0 (success)
307
308 `int Barcode_Encode(struct Barcode_Item *bc, int flags);'
309      Encode the text included in the bc object. Valid flags are the
310      encoding type (other flags are ignored) and BARCODE_NO_CHECKSUM
311      (other flags are silently ignored); if the flag argument is zero,
312      bc->flags will apply. The function returns 0 on success and -1 in
313      case of error. After successful termination the data structure
314      will host the description of the bar code and its textual
315      representation, after a failure the error field will include the
316      reason of the failure.
317
318 `int Barcode_Print(struct Barcode_Item *bc, FILE *f, int flags);'
319      Print the bar code described by bc to the specified file.  Valid
320      flags are the output type, BARCODE_NO_ASCII and
321      BARCODE_OUT_NOHEADERS, other flags are ignored. If any of these
322      flags is zero, it will be inherited from bc->flags which therefore
323      takes precedence. The function returns 0 on success and -1 in case
324      of error (with bc->error set accordingly). In case of success, the
325      bar code is printed to the specified file, which won't be closed
326      after use.
327
328 `int Barcode_Position(struct Barcode_Item *bc, int wid, int hei, int xoff, int yoff, double scalef);'
329      The function is a shortcut to assign values to the data structure.
330
331 `int Barcode_Encode_and_Print(char *text, FILE *f, int wid, int hei, int xoff, int yoff, int flags);'
332      The function deals with the whole life of the barcode object by
333      calling the other functions; it uses all the specified flags.
334
335 `int Barcode_Version(char *versionname);'
336      Returns the current version as an integer number of the form major
337      * 10000 + minor * 100 + release. Therefore, version 1.03.5 will be
338      returned as 10305 and version 0.53 as 5300.  If the argument is
339      non-null, it will be used to return the version number as a
340      string. Note that the same information is available from two
341      preprocessor macros: BARCODE_VERSION (the string) and
342      BARCODE_VERSION_INT (the integer number).
343
344 \1f
345 File: barcode.info,  Node: The barcode Executable,  Next: Supported Encodings,  Prev: The API,  Up: Top
346
347 The barcode frontend program
348 ****************************
349
350    The barcode program is a front-end to access some features of the
351 library from the command line.  It is able to read user supplied
352 strings from the command line or a data file (standard input by default)
353 and encode all of them.
354
355 * Menu:
356
357 * The Command Line::
358
359 \1f
360 File: barcode.info,  Node: The Command Line,  Prev: The barcode Executable,  Up: The barcode Executable
361
362 The Command Line
363 ================
364
365    barcode accepts the following options:
366
367 `--help or -h'
368      Print a usage summary and exit.
369
370 `-i filename'
371      Identify a file where strings to be encoded are read from. If
372      missing (and if -b is not used) it defaults to standard input.
373      Each data line of the input file will be used to create one
374      barcode output.
375
376 `-o filename'
377      Output file. It defaults to standard output.
378
379 `-b string'
380      Specify a single "barcode" string to be encoded.  The option can
381      be used multiple times in order to encode multiple strings (this
382      will result in multi-page postscript output or a table of barcodes
383      if -t is specified).  The strings must match the encoding chosen;
384      if it doesn't match the program will print a warning to stderr and
385      generate "blank" output (although not zero-length).  Please note
386      that a string including spaces or other special characters must be
387      properly quoted.
388
389 `-e encoding'
390      encoding is the name of the chosen encoding format being used. It
391      defaults to the value of the environment variable BARCODE_ENCODING
392      or to auto detection if the environment is also unset.
393
394 `-g geometry'
395      The geometry argument is of the form "[<width> x <height>] [+
396      <xmargin> + <ymargin>]" (with no intervening spaces). Unspecified
397      margin values will result in no margin; unspecified size results
398      in default size.  The specified values represent print points by
399      default, and can be inches, millimeters or other units according
400      to the -u option or the BARCODE_UNIT environment variable.  The
401      argument is used to place the printout code on the page. Note that
402      an additional white margin of 10 points is added to the printout.
403      If the option is unspecified, BARCODE_GEOMETRY is looked up in the
404      environment, if missing a default size and no margin (but the
405      default 10 points) are used.
406
407 `-t table-geometry'
408      Used to print several barcodes to a single page, this option is
409      meant to be used to print stickers. The argument is of the form
410      "<columns> x <lines> [+ <leftmargin> + <bottommargin> [-
411      <rightmargin> [- <topmargin>]]]" (with no intervening spaces); if
412      missing, the top and right margin will default to be the same as
413      the bottom and left margin. The margins are specified in print
414      points or in the chosen unit (see -u below).  If the option is not
415      specified, BARCODE_TABLE is looked up in the environment,
416      otherwise no table is printed and each barcode will get its own
417      page.  The size (but not the position) of a barcode item within a
418      table can also be selected using -g (see "geometry" above),
419      without struggling with external and internal margins.  I still
420      think management of geometries in a table is suboptimal, but I
421      can't make it better without introducing incompatibilities.
422
423 `-m margin(s)'
424      Specifies an internal margin for each sticker in the table. The
425      argument is of the form "<xmargin>,<ymargin>" and the margin is
426      applied symmetrically to the sticker. If unspecified, the
427      environment variable BARCODE_MARGIN is used or a default internal
428      margin of 10 points is used.
429
430 `-n'
431      "Numeric" output: don't print the ASCII form of the code, only the
432      bars.
433
434 `-c'
435      No checksum character (for encodings that allow it, like code 39,
436      other codes, like UPC or EAN, ignore this option).
437
438 `-E'
439      Encapsulated postscript (default is normal postscript). When the
440      output is generated as EPS only one barcode is encoded.
441
442 `-P'
443      PCL output. Please note that the Y direction goes from top to
444      bottom for PCL, and the origin for an image is the top-left corner
445      instead of the bottom-left
446
447 `-p pagesize'
448      Specify a non-default page size. The page size can be specified in
449      millimeters, inches or plain numbers (for example: "210x297mm",
450      "8.5x11in", "595x842"). A page specification as numbers will be
451      interpreted according to the current unit specification (see -u
452      below). If libpaper is available, you can also specify the page
453      size with its name, like "A3" or "letter" (libpaper is a standard
454      component of Debian GNU/Linux, but may be missing elsewhere). The
455      default page size is your system-wide default if libpaper is
456      there, A4 otherwise.
457
458 `-u unit'
459      Choose the unit used in size specifications. Accepted values are
460      "mm", "cm", "in" and "pt". By default, the program will check
461      BARCODE_UNIT in the environment, and assume points otherwise (this
462      behaviour is compatible with 0.92 and previous versions. If -u
463      appears more than once, each instance will modified the behaviour
464      for the arguments at its right, as the command line is processes
465      left to right. The program internally works with points, and any
466      size is approximated to the nearest multiple of one point. The -u
467      option affect -g (geometry), -t (table) and -p (page size).
468
469 \1f
470 File: barcode.info,  Node: Supported Encodings,  Next: PCL Output,  Prev: The barcode Executable,  Up: Top
471
472 Supported Encodings
473 *******************
474
475    The program encodes text strings passed either on the command line
476 (with -b) or retrieved from standard input. The text representation is
477 interpreted according to the following rules. When auto-detection of
478 the encoding is enabled (i.e, no explicit encoding type is specified),
479 the encoding types are scanned to find one that can digest the text
480 string.  The following list of supported types is sorted in the same
481 order the library uses when auto-detecting a suitable encoding for a
482 string.
483
484 EAN
485      The EAN frontend is similar to UPC; it accepts strings of digits,
486      12 or 7 characters long. Strings of 13 or 8 characters are
487      accepted if the provided checksum digit is correct.  I expect most
488      users to feed input without a checksum, though. The add-2 and
489      add-5 extension are accepted for both the EAN-13 and the EAN-8
490      encodings.  The following are example of valid input strings:
491      "123456789012" (EAN-13), "1234567890128" (EAN-13 wih checksum),
492      "1234567" (EAN-8), "12345670 12345" (EAN-8 with checksum and
493      add-5), "123456789012 12" (EAN-13 with add-2), "123456789012
494      12345" (EAN-13 with add-5).
495
496 UPC
497      The UPC frontend accepts only strings made up of digits (and, if a
498      supplemental encoding is used, a blank to separate it).  It
499      accepts strings of 11 or 12 digits (UPC-A) and 6 or 7 or 8 digits
500      (UPC-E).
501
502      The 12th digit of UPC-A is the checksum and is added by the
503      library if not specified in the input; if it is specified, it must
504      be the right checksum or the code is rejected as invalid.  For
505      UPC-E, 6 digit are considered to be the middle part of the code, a
506      leading 0 is assumed and the checksum is added; 7 digits are
507      either considered the initial part (leading digit 0 or 1, checksum
508      missing) or the final part (checksum specified, leading 0
509      assumed); 8 digits are considered to be the complete code, with
510      leading 0 or 1 and checksum.  For both UPC-A and UPC-E, a trailing
511      string of 2 digits or 5 digits is accepted as well. Therefore, the
512      following are examples of valid strings that can be encoded as UPC:
513      "01234567890" (UPC-A) "012345678905" (UPC-A with checksum),
514      "012345" (UPC-E), "01234567890 12" (UPC-A, add-2) and "01234567890
515      12345" (UPC-A, add-5), "0123456 12" (UPC-E, add-2).  Please note
516      that when setting BARCODE_ANY to auto-detect the encoding to be
517      used, 12-digit strings and 7-digit strings will always be
518      identified as EAN. This because I expect most user to provide
519      input without a checksum. If you need to specify UPC-with-checksum
520      as input you must explicitly set BARCODE_UPC as a flag or use -e
521      upc on the command line.
522
523 ISBN
524      ISBN numbers are encoded as EAN-13 symbols, with an optional add-5
525      trailer. The ISBN frontend of the library accepts real ISBN
526      numbers and deals with any hyphen and, if present, the ISBN
527      checksum character before encoding data. Valid representations for
528      ISBN strings are for example: "1-56592-292-1", "3-89721-122-X" and
529      "3-89721-122-X 06900".
530
531 CODE 128-B
532      This encoding can represent all of the printing ASCII characters,
533      from the space (32) to DEL (127). The checksum digit is mandatory
534      in this encoding.
535
536 CODE 128-C
537      The "C" variation of Code-128 uses Code-128 symbols to represent
538      two digits at a time (Code-128 is made up of 104 symbols whose
539      interpretation is controlled by the start symbol being used). Code
540      128-C is thus the most compact way to represent any even number of
541      digits. The encoder refuses to deal with an odd number of digits
542      because the caller is expected to provide proper padding to an
543      even number of digits. (Since Code-128 includes control symbols to
544      switch charset, it is theoretically possible to represent the odd
545      digit as a Code 128-A or 128-B symbol, but this tool doesn't
546      currently implement this option).
547
548 CODE 128 RAW
549      Code-128 output represented symbol-by-symbol in the input string.
550      To override part of the problems outlined below in specifying
551      code128 symbols, this pseudo-encoding allows the used to specify a
552      list of code128 symbols separated by spaces. Each symbol is
553      represented by a number in the range 0-105.  The list should
554      include the leading character.The checksum and the stop character
555      are automatically added by the library. Most likely this
556      pseudo-encoding will be used with BARCODE_NO_ASCII and some
557      external program to supply the printed text.
558
559 CODE 39
560      The code-39 standard can encode uppercase letters, digits, the
561      blank space, plus, minus, dot, star, dollar, slash, percent.  Any
562      string that is only composed of such characters is accepted by the
563      code-39 encoder. To avoid loosing information, the encoder refuses
564      to encode mixed-case strings (a lowercase string is nonetheless
565      accepted as a shortcut, but is encoded as uppercase).
566
567 INTERLEAVED 2 OF 5
568      This encoding can only represent an even number of digits (odd
569      digits are represented by bars, and even digits by the
570      interleaving spaces). The name stresses the fact that two of the
571      five items (bars or spaces) allocated to each symbol are wide,
572      while the rest are narrow. The checksum digit is optional (can be
573      disabled via BARCODE_NO_CHECKSUM).  Since the number of digits,
574      including the checksum, must be even, a leading zero is inserted
575      in the string being encoded if needed (this is specifically stated
576      in the specs I have access to).
577
578 CODE 128
579      Automatic selection between alphabet A, B and C of the Code-128
580      standard. This encoding can represent all ASCII symbols, from 0
581      (NUL) to 127 (DEL), as well as four special symbols, named F1, F2,
582      F3, F4. The set of symbols available in this encoding is not
583      easily represented as input to the barcode library, so the
584      following convention is used.  In the input string, which is a
585      C-language null-terminated string, the NUL char is represented by
586      the value 128 (0x80, 0200) and the F1-F4 characters are
587      represented by the values 193-196 (0xc1-0xc4, 0301-0304).  The
588      values have been chosen to ease their representation as escape
589      sequences.
590
591      Since the shell doesn't seem to interpret escape sequences on the
592      command line, the "-b" option cannot be easily used to designate
593      the strings to be encoded. As a workaround you can resort to the
594      command echo, either within back-ticks or used separately to
595      create a file that is then fed to the standard-input of barcode -
596      assuming your echo command processes escape sequences.  The
597      newline character is especially though to encode (but not
598      impossible unless you use a csh variant.
599
600      These problems only apply to the command-line tool; the use of
601      library functions doesn't give any problem. In needed, you can use
602      the "code 128 raw" pseudo-encoding to represent code128 symbols by
603      their numerical value. This encoding is used late in the
604      auto-selection mechanism because (almost) any input string can be
605      represented using code128.
606
607 CODABAR
608      Codabar can encode the ten digits and a few special symbols
609      (minus, plus, dollar, colon, bar, dot). The characters "A", "B",
610      "C" and "D" are used to represent four different start/stop
611      characters. The input string to the barcode library can include
612      the start and stop characters or not include them (in which case
613      "A" is used as start and "B" as stop). Start and stop characters
614      in the input string can be either all lowercase or all uppercase
615      and are always printed as uppercase.
616
617 PLESSEY
618      Plessey barcodes can encode all the hexadecimal digits. Alphabetic
619      digits in the input string must either be all lowercase or all
620      uppercase. The output text is always uppercase.
621
622 MSI
623      MSI can only encode the decimal digits. While the standard
624      specifies either one or two check digits, the current
625      implementation in this library only generates one check digit.
626
627 CODE 93
628      The code-93 standard can natively encode 48 different characters,
629      including uppercase letters, digits, the blank space, plus, minus,
630      dot, star, dollar, slash, percent, as well as five special
631      characters:  a start/stop delimiter and four "shift characters"
632      used for extended encoding.    Using this "extended encoding"
633      method, any standard 7-bit ASCII character can be encoded, but it
634      takes up two symbol lengths in barcode if the character is not
635      natively supported (one of the 48).  The encoder here fully
636      implements the code 93 encoding standard.  Any characters natively
637      supported (A-Z, 0-9, ".+-/$&%") will be encoded as such - for any
638      other characters (such as lower case letters, brackets,
639      parentheses, etc.), the encoder will revert to extended encoding.
640      As a note, the option to exclude the checksum will eliminate the
641      two modulo-47 checksums (called C and K) from the barcode, but this
642      probably will make it unreadable by 99% of all scanning systems.
643      These checksums are specified to be used at the firmware level,
644      and their absence will be interpreted as an invalid barcode.
645
646 \1f
647 File: barcode.info,  Node: PCL Output,  Next: Bugs and Pending Issues,  Prev: Supported Encodings,  Up: Top
648
649 PCL Output
650 **********
651
652    While the default output is Postscript (possibly EPS), and Postscript
653 can be post-processed to almost anything, it is sometimes desirable to
654 create output directly usable by the specific printer at hand.  PCL is
655 currently supported as an output format for this reason.  Please note
656 that the Y coordinate for PCL goes from top to bottom, while for
657 Postscript it goes from bottom to top. Consistently, while in
658 Postscript you specify the bottom-left corner as origin, for PCL you
659 specify the top-left corner.
660
661    Barcode output for PCL Printers (HP LaserJet and compatibles), was
662 developed using PCL5 Reference manuals from HP.  that really refers to
663 these printers:
664    * LaserJet III, III P, III D, III Si,
665
666    * LaserJet 4 family
667
668    * LaserJet 5 family
669
670    * LaserJet 6 family
671
672    * Color LaserJet
673
674    * DeskJet 1200 and 1600.
675
676
677    However, barcode printing uses a very small subset of PCL, probably
678 also LaserJet II should print it without problem, but the resulting
679 text may be horrible.
680
681    The only real difference from one printer to another really depends
682 on which font are available in the printer, used in printing the label
683 associated to the bars (if requested).
684
685    Earlier LaserJet supports only bitmaps fonts, so these are not
686 "scalable". (Ljet II ?), Also these fonts, when available, have a
687 specified direction, and not all of them are available in both Portrait
688 and Landscape mode.
689
690    From LaserJet 4 series, (except 4L/5L that are entry-level printers),
691 Arial scalable font should be available, so it's the "default font"
692 used by this program.
693
694    LaserJet III series printers (and 4L, 5L), don't feature "Arial" as a
695 resident font, so you should use BARCODE_OUT_PCL_III instead of
696 BARCODE_OUT_PCL., and font the font used will be "Univers" instead of
697 "Arial".
698
699    Results on compatible printers, may depend on consistency of PCL5
700 compatibility, in doubt, try BARCODE_OUT_PCL_III
701
702    PJL commands are not used here, as it's not very compatible.
703
704    Tested Printers:
705    * Hp LaserJet 4050
706
707    * Hp LaserJet 2100
708
709    * Epson N-1200 emul PCL
710
711    * Toshiba DP2570 (copier) + PCL option
712
713    * Epson EPL-7100 emul. HP LaserJet II: bars print fine but text is
714      bad.
715
716 \1f
717 File: barcode.info,  Node: Bugs and Pending Issues,  Prev: PCL Output,  Up: Top
718
719 Bugs and Pending Issues.
720 ************************
721
722    The current management of borders/margins is far from optimal. The
723 "default" margin applied by the library interferes with the external
724 representation, but I feel it is mandatory to avoid creating barcode
725 output with no surrounding white space (the problem is especially
726 relevant for EPS output).
727
728    EAN-128 is not (yet) supported. I plan to implement it pretty soon
729 and then bless the package as version 1.0.
730
731
732 \1f
733 Tag Table:
734 Node: Top\7f154
735 Node: Overview\7f526
736 Node: The Barcode Object\7f1404
737 Node: The Field List\7f2821
738 Node: The Intermediate Representation\7f6586
739 Node: Supported Flags\7f8359
740 Node: The API\7f11343
741 Node: The barcode Executable\7f14029
742 Node: The Command Line\7f14458
743 Node: Supported Encodings\7f19557
744 Node: PCL Output\7f28997
745 Node: Bugs and Pending Issues\7f31316
746 \1f
747 End Tag Table