给我50分!
//获取打印机信息
//通常分辨率是指一英寸的点数,1英寸=2.54厘米
//取得每一英寸的点数,分x与y
pointx := getdevicecaps(printer.Handle, logpixelsx);
pointy := getdevicecaps(printer.Handle, logpixelsy);
//计算每毫米多少点
pointx := pointx / 25.4;
pointy := pointy / 25.4;
//打印:其中sbk_detail.yf 等的单位是毫米
printer.begin
Doc;
printer.Canvas.TextOut(sbk_detail.yf * pointx, sbk_yf[j] * pointy, IntToStr(j));
printer.Canvas.TextOut(sbk_detail.hde * pointx, sbk_yf[j] * pointy, '¥'+FLOATToStr(sbk_print[j].hde) + '元');
printer.EndDoc;