您的位置->>速创科技->>在线支持                                  

编号:2501 留言者名称:laian 标题:在PPLB语言的打印机,如何打印宋体汉字?急急急!!!
如题
地区:新疆    留言时间: 2003-10-10 16:16:49
专家解答:
您是用动态连接库编程吗,若是请用这个函数B_Prn_Text_TrueType()
B_Prn_Text_TrueType_W()
    ===============================================================================
        PURPOSE  Create a "True Type Font" text object.

         SYNTAX  int B_Prn_Text_TrueType(int x, int y, int FSize, LPCTSTR FType,
                                      int Fspin, int FWeight, int FItalic, int FUnline,
                                      int FStrikeOut, LPCTSTR id_name, LPCTSTR data,
                                      int mem_mode);
 int B_Prn_Text_TrueType_W(int x,int y,int FHeight,int FWidth,LPCTSTR FType,
                                    int Fspin,int FWeight,int FItalic,int FUnline,
                                    int FStrikeOut,LPCTSTR id_name,LPCTSTR data);
      
      PARAMETER  int      x;              X coordinates.
                 int      y;              Y coordinates.
                 int      FSize;          TrueType font size,unit is (dot).
FSize = (dpi * point) / 72.
 int      FHeight;        Font Height, unit is (dot).
FHeight = (dpi * point) / 72.
                 int      FWidth;         Font Width, unit is (dot).
FWidth = (dpi * point) / 72.
                 LPCTSTR  FType;          TrueType font type name.
                 int      Fspin;          TrueType font to rotate.
                                           1 -> 0, 2 -> 90, 3 -> 180, 4 -> 270
                 int      FWeight;        TrueType font thickness bellow:
                                           0 and NULL and 400 -> standard,
                                           100 -> special thin,200 -> very thin,
                                           300 -> thin        ,500 -> middle,
                                           600 -> half thick  ,700 -> thick,
                                           800 -> special thick,900 ->blackbody.
                 int      FItalic;        TrueType font italic.
                                           0 -> FALSE, 1 -> TRUE.
                 int      FUnline;        TrueType font underline.
                                           0 -> FALSE, 1 -> TRUE.
                 int      FStrikeOut;     TrueType font StrikeOut.
                                           0 -> FALSE, 1 -> TRUE.
                 LPCTSTR  id_name;        To give a id name to store in printer after
                                           calling text by Load_Pcx().
                 LPCTSTR  data;           A text string.

         RETURN  0    -> OK.
                 Reference BW-Error.txt file.

        EXAMPLE  B_Prn_Text_TrueType(30,35,40,"Times New Roman",4,400,0,0,0,"AA","ABCDEF");
 B_Prn_Text_TrueType_W(30,35,40,40,"Times New Roman",4,400,0,0,0,"AA","ABCDEF");

         REMARK  The B_Prn_Text_TrueType function is able to print a text for True
                 Type Font, But you must install Window's Driver for Dr.200 or Dr.300
                 first. And adjust the darkness. This function will first search the
                 Windows driver (Dr.200 or Dr.300) from PCs existing default driver.
                 If the default driver is for other printer, it will sreach Dr.200
                 and then Dr.300.  

若使用机器指令编程需要购买中文卡

条码小知识:
CCD阅读器的工作原理

CCD为电子耦合器件(Charg couple device),比较适合近距离和接触阅读,它的价格没有激光阅读器贵,而且内部没有移动部件。

CCD阅读器使用一个或多个LED,发出的光线能够覆盖整个条码,条码的图像被传到一排光探测器上,被每个单独的光电二激管采样,由邻近的探测器的探测结果为“黑”或“白”区分每一个条或空,从而确定条码的字符,换言之,CCD阅读器不是注意的阅读每一个“条”或“空”,而是条码的整个部分,并转换成可以译码的电信号。

优点:与其它阅读器相比,CCD阅读器的价格较便宜,但同样有阅读条码的密度广泛,容易使用。它的重量比激光阅读器轻,而且不象光笔一样只能接触阅读。

缺点:CCD阅读器的局限在于它的阅读景深和阅读宽度,在需要阅读印在弧型表面的条码(如饮料罐)时候会有困难;在一些需要远距离阅读的场合,如仓库领域,也不是很适合;CCD的防摔性能较差,因此产生的故障率较高;在所要阅读的条码比较宽时,CCD也不是很好的选择,信息很长或密度很低的条码很容易超出扫描头的阅读范围,导致条码不可读;而且某些采取多个LED的条码阅读器中,任意一个的LED故障都会导致不能阅读;大部分CCD阅读器的首读成功率较低且误码机率高。