TSC TTP-342M Pro条码打印机的调用打印代码

//TSCLIB_DLL.openport("TSC TTP-342M Pro");
                ////TSCLIB_DLL.openport("HP LaserJet P1008");

                ////Open specified printer driver
                ////定义纸张大小
                //TSCLIB_DLL.setup("103", "150", "4", "12", "0", "3", "0");
                //TSCLIB_DLL.clearbuffer();

           TSCLIB_DLL.sendcommand("BOX 5,5,1020,870,6");  //定义外框

            TSCLIB_DLL.sendcommand("BAR 600,290,315,4");//横向
            TSCLIB_DLL.sendcommand("BAR 600,430,315,4");//横向                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
            TSCLIB_DLL.sendcommand("BAR 600,730,420,4");//横向       

 

            TSCLIB_DLL.sendcommand("BAR 600,5,4,865");//竖向
            TSCLIB_DLL.sendcommand("BAR 705,5,4,865");//竖向
            TSCLIB_DLL.sendcommand("BAR 810,5,4,865");//竖向
            TSCLIB_DLL.sendcommand("BAR 915,5,4,865");//竖向

            TSCLIB_DLL.windowsfont(650, 850, 35, 90, 0, 0, "黑体", "订单");
            TSCLIB_DLL.windowsfont(650, 705, 45, 90, 0, 0, "黑体", mo_no);

            TSCLIB_DLL.windowsfont(755, 850, 35, 90, 0, 0, "黑体", "规格");
            TSCLIB_DLL.windowsfont(755, 705, 45, 90, 0, 0, "黑体", bianm);

            TSCLIB_DLL.windowsfont(860, 850, 35, 90, 0, 0, "黑体", "数量");
            TSCLIB_DLL.windowsfont(860, 705, 45, 90, 0, 0, "黑体", guige);

            TSCLIB_DLL.windowsfont(965, 850, 35, 90, 0, 0, "黑体", "产品名称");
            TSCLIB_DLL.windowsfont(965, 705, 45, 90, 0, 0, "黑体", mingc);

            TSCLIB_DLL.windowsfont(650, 420, 35, 90, 0, 0, "黑体", "本版数量");
            TSCLIB_DLL.windowsfont(650, 280, 45, 90, 0, 0, "黑体", "");

          TSCLIB_DLL.barcode("1030", "798", "128", "100", "1", "270", "4", "1", tiaoma);

   //TSCLIB_DLL.printlabel("1", "1");
                //TSCLIB_DLL.closeport();
          
            //TSCLIB_DLL.windowsfont(230, 1465, 60, 0, 0, 0, "黑体", st4);

posted @ 2012-02-10 15:53  迈着步_  阅读(2198)  评论(1编辑  收藏  举报