unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
Function B_CreatePrn(selection: Int64; filename: String):Int64;stdcall; far;External 'WINPPLB.dll' name 'B_CreatePrn' ;
Function B_Set_Darkness(darkness: Int64): Int64;stdcall; far;External 'WINPPLB.dll' name 'B_Set_Darkness' ;
Function B_Print_Out(copypiece: Int64): Int64;stdcall; far;External 'WINPPLB.dll' name 'B_Print_Out' ;
Function B_Prn_Text(x: Int64; y: Int64; ori: Int64; font: Int64; hor_factor: Int64; ver_factor: Int64; mode: Byte; data: String): Int64;stdcall; far;External 'WINPPLB.dll' name 'B_Prn_Text';
Function B_Prn_Barcode(x: Int64; y: Int64; ori: Int64; typee: String; narrow: Int64; width: Int64; height: Int64; human: Byte; data: String): Int64;stdcall; far;External 'WINPPLB.dll' name 'B_Prn_Barcode' ;
Function B_Prn_Text_TrueType(x: Int64; y: Int64; FSize: Int64; FType: String; Fspin: Int64; FWeight: Int64; FItalic: Int64; FUnline: Int64; FStrikeOut: Int64; id_name: String; data: String): Int64;stdcall; far;External 'WINPPLB.dll' name 'B_Prn_Text_TrueType';
Function B_Get_Pcx(x: Int64; y: Int64; filename: String): Int64;stdcall; far;External 'WINPPLB.dll' name 'B_Get_Pcx';
Procedure B_ClosePrn;External 'WINPPLB.dll';
type
TForm1 = class(TForm)
Edit1: TEdit;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
uses Unit2;
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
//B_CreatePrn(0, 'os-214textout.prn');
B_CreatePrn(0,'out.prn') ;
B_Set_Darkness(12) ;
B_Get_Pcx(450, 50, 'phone.pcx') ;
B_Prn_Barcode(20, 200, 0, '1', 2, 2, 40, 66, Edit1.Text) ;
B_Prn_Text(20, 150, 0, 4, 1, 1, 78, Edit1.Text) ;
B_Prn_Text_TrueType(20, 0, 40, '宋体', 1, 400, 0, 0, 0, 'AA', '测试成功') ;
B_Prn_Text_TrueType(20, 70, 40, '宋体', 1, 400, 0, 0, 0, 'AB', 'Delphi 测试') ;
B_Print_Out(1) ;
B_ClosePrn ;
end;
end.
|
|