小
小橄榄
Unregistered / Unconfirmed
GUEST, unregistred user!
现需要把所附打印代码转换为利用WinAPI来实现,形式如下:
stratdoc()
startpage()
..打印代码
endpage()
enddoc()
注:(如果能把所附代码嵌进startpage与endpage之间,而且能够正常打印,
那就不用转为API来打印了)
附代码:
with Printerdo
begin
begin
Doc;
Canvas.Pen.Width := 2;
Canvas.Pen.Color := $00646464;
Canvas.Pen.Style := psSolid;
Canvas.Brush.Style := bsClear;
Canvas.Rectangle(0,0,100,100);
Canvas.Font.Style := [fsBold];
Canvas.Font.Size := 11;
Canvas.Font.Name := '楷体_GB2312';
Canvas.Font.Color := $00646464;
Canvas.TextOut(0,200,'打印测试');
Canvas.Pen.Width := 2;
Canvas.Pen.Color := $00646464;
Canvas.MoveTo(200,200);
Canvas.LineTo(300,300);
EndDoc;
end;
stratdoc()
startpage()
..打印代码
endpage()
enddoc()
注:(如果能把所附代码嵌进startpage与endpage之间,而且能够正常打印,
那就不用转为API来打印了)
附代码:
with Printerdo
begin
begin
Doc;
Canvas.Pen.Width := 2;
Canvas.Pen.Color := $00646464;
Canvas.Pen.Style := psSolid;
Canvas.Brush.Style := bsClear;
Canvas.Rectangle(0,0,100,100);
Canvas.Font.Style := [fsBold];
Canvas.Font.Size := 11;
Canvas.Font.Name := '楷体_GB2312';
Canvas.Font.Color := $00646464;
Canvas.TextOut(0,200,'打印测试');
Canvas.Pen.Width := 2;
Canvas.Pen.Color := $00646464;
Canvas.MoveTo(200,200);
Canvas.LineTo(300,300);
EndDoc;
end;