您的位置->>条码打印机->>在线支持                                  

编号:3998 留言者名称:姚先生 标题:如何用代码连续打印条码?
用ppla,如何连续打印几个条码,请给简单的代码示例。
地区:江苏    留言时间: 2004-7-22 9:21:02
专家解答:
A_Prn_Barcode()
    ===============================================================================
        PURPOSE  Create a "barcode" object.

         SYNTAX  int A_Prn_Barcode(int x, int y, int ori, char type, int narrow,
                     int width, int height, char mode, int numeric, LPTSTR data);

      PARAMETER  int     x;          X coordinate.
                 int     y;          Y coordinate.
                 int     ori;        Orientation or print direction.
                                     Value: 1,2,3,4
                 char    type;       Bar code type as follows:
     +==========================================================================+
     |Bar code    |Length    |Check|Type for|Type for   |Valid        |Bar ratio|
     |            |          |sum  |readable|nonreadable|codes        |         |
     |            |          |     |string  |string     |             |         |
     +============+==========+=====+========+===========+=============+=========+
     |Code 3 of 9 |variable  |no   |'A'     |'a'        |0~9,A~Z,$%*+-|2:1~     |
     |            |          |     |        |           |./and space  |3:1      |
     +------------+----------+-----+--------+-----------+-------------+---------+
     |UPC-A       |12 digis  |yes  |'B'     |'b'        |0~9          |2:3:4    |
     |            |(11+1)    |     |        |           |             |         |
     +------------+----------+-----+--------+-----------+-------------+---------+
     |UPC-E       |7 digits  |yes  |'C'     |'c'        |0~9          |2:3:4    |
     |            |(6+1)     |     |        |           |             |         |
     +------------+----------+-----+--------+-----------+-------------+---------+
     |Interleaved |variable  |no   |'D'     |'d'        |0~9          |2:1~     |
     |2 of 5 (I25)|          |     |        |           |             |3:1      |
     +------------+----------+-----+--------+-----------+-------------+---------+
     |Code 128    |variable  |yes  |'E'     |'e'        |form code 0  |2:3:4    |
     |            |          |     |        |           |to 127       |         |
     +------------+----------+-----+--------+-----------+-------------+---------+
     |EAN-13      |13 digits |yes  |'F'     |'f'        |0~9          |2:3:4    |
     |            |(12+1)    |     |        |           |             |         |
     +------------+----------+-----+--------+-----------+-------------+---------+
     |ENA-8       |8 digits  |yes  |'G'     |'g'        |0~9          |2:3:4    |
     |            |(7+1)     |     |        |           |             |         |
     +------------+----------+-----+--------+-----------+-------------+---------+
     |HBIC        |variable  |yes  |'H'     |'h'        |0~9,A~Z,$%*+-|2:1~     |
     |            |          |     |        |           |./and space  |3:1      |
     +------------+----------+-----+--------+-----------+-------------+---------+
     |Coda bar    |at least 3|no   |'I'     |'i'        |0~9,A~Z,$+-. |2:1~     |
     |            |characters|     |        |           |And /        |3:1      |
     +------------+----------+-----+--------+-----------+-------------+---------+
     |Interleaved |variable  |yes  |'J'     |'j'        |0~9          |2:1~     |
     |2 of 5 with +----------+     |        |           |             |3:1      |
     |a modulo 10 checksum   |     |        |           |             |         |
     +-----------------------+-----+--------+-----------+-------------+---------+
     |Plessey     |1~14      |yes  |'K'     |'k'        |0~9          |2:1~     |
     |            |digits    |     |        |           |             |3:1      |
     +------------+----------+-----+--------+-----------+-------------+---------+
     |Interleaved |variable  |yes  |'L'     |'l'        |0~9          |2:1~     |
     |2 of 5 with +----------+-----+--------+-----------+             |3:1      |
     |a modulo 10 checksum and shipping bearer bars     |             |         |
     +------------+----------+-----+--------+-----------+-------------+---------+
     |UPC2        |2 digits  |no   |'M'     |'m'        |0~9          |2:3:4    |
     +------------+----------+-----+--------+-----------+-------------+---------+
     |UPC5        |5 digits  |no   |'N'     |'n'        |0~9          |2:3:4    |
     +------------+----------+-----+--------+-----------+-------------+---------+
     |Code 93     |variable  |no   |'O'     |'o'        |0~9,A~Z,$%*+-|2:3:4    |
     |            |          |     |        |           |./and space  |         |
     +------------+----------+-----+--------+-----------+-------------+---------+
     |Postnet     |variable  |yes  |not     |'p'        |0~9          |         |
     |            |          |     |defined |           |             |         |
     +------------+----------+-----+--------+-----------+-------------+---------+
     |UCC/EAN Code|20 digits |yes  |'Q'     |'q'        |0~9          |2:3:4    |
     |128         |(19+1)    |     |        |           |             |         |
     +------------+----------+-----+--------+-----------+-------------+---------+
     |UCC/EAN Code|18 digits |yes  |'R'     |'r'        |0~9          |2:3:4    |
     |128 k-MART  |          |     |        |           |             |         |
     +------------+----------+-----+--------+-----------+-------------+---------+
     |Matrix 2 5  |variable  |no   |'S'     |'s'        |0~9          |2:1~     |
     |            |          |     |        |           |             |3:1      |
     +------------+----------+-----+--------+-----------+-------------+---------+
     |Telepen     |variable  |yes  |'T'     |'t'        |form code 0  |2:3:4    |
     |            |          |     |        |           |to 127       |         |
     +------------+----------+-----+--------+-----------+-------------+---------+
     |FIM         |1         |no   |not     |'v'        |A,B,C and D  |         |
     |            |character |     |defined |           |             |         |
     +------------+----------+-----+--------+-----------+-------------+---------+
      Note: See Programmer Manual P.63~76.
                 int     narrow;     Define the narrow bar width from 0 ~ 24.
                 int     width;      Define the wide bar width from 0 ~ 24.
                 int     height;     Bar code height. Value:0 ~ 999.
                 char    mode;       Add function as follows:
                                     +----+-------------------------------------+
                                     |mode|           REMARK                    |
                                     +----+-------------------------------------+
                                     | A  |Make auto increment for numeric.     |
                                     +----+-------------------------------------+
                                     | B  |Make auto increment for alphanumeric.|
                                     +----+-------------------------------------+
                                     | C  |Make auto decrement for numeric.     |
                                     +----+-------------------------------------+
                                     | D  |Make auto decrement for alphanumeric.|
                                     +----+-------------------------------------+
                                     | N  |Disable.                             |
                                     +----+-------------------------------------+
                 int     numeric;    Automaticall increment or decrement the filed
                                      value. Value:0 ~ 99.
                 LPTSTR  data;       Data string.

条码小知识:
近年来,国内在大力进行条码推广应用的同时也积极跟踪国外技术发展,进行条码理论基础和关键技术的研究。中国物品编码中心条码高新技术研究立项进行二维码研究工作。在二维码制设计、编码原理等方面进行了探索,提出了一种自动识别方位进行校正的J结构方案与中心符相结合的二维码制初步编码方案。对二维码图象处理译码解码算法以及隐形码等关键技术进行了研究,并取得一些初步成果。

综上所述,二维条码的码的研制之所以能引起国内外条码技术领域学者专家的关注,其根本原因是作为信息自动识别处理的条码应具有更高信息密度才能在经济全球化、信息网络化、生活国际化的当今社会充分起到信息交换媒介的作用。二维条码不仅可以象一维条码那样用在一般产品上,而且在微小型产品、自动生产线上的产品识别等方面更具有独特优势,可以预言,二维码的应用深度和广度将在条码技术发展中起着重要的更新换代作用。