Delphi 打印--打印机选择

评价:
0
(0用户)

var
mdevice : array[0..255] of char;
mdriver : array[0..255] of char;
mport : array[0..255] of char;
mhdmode : thandle;
mpdmode : pdevmode;
begin
printer.getprinter(mdevice, mdriver, mport, mhdmode);
printer.setprinter('fineprint pdffactory pro', mdriver, mport, mhdmode); //设置打印机

printer.begindoc;
printer.canvas.moveto(0, 0);
printer.canvas.lineto(300, 300);
printer.canvas.textout(20, 20, '打印文字');
printer.enddoc;
end;

注册并通过认证的用户才可以进行评价!

发表评论

Previous article

DELPHI 虚拟继承示例