Impresion en Tiquetes o Tirillas
:confused:
Hola Amigos, espero esten bien todos. Tengo una necesidad de imprimir en tiquetes o tirillas , como las de los supermercados... pero hasta ahora siempre he impreso en impresoras para papel carta u oficio etc.....pero no en estos delgados papeles de impresion especial... si alguien me puede dar una idea le agradezco..por que estoy azul. De antemano muchas gracias.. |
Hola, en principio la impresión es igual que en las impresoras "grandes".
Teniendo instalados los driver correctos de la impresora de tiquets, y ajustando el tamaño de la hoja a imprimir, no deberías tener ningún problema. |
Imprecion de tiquetes de caja, colillas o tirillas
Saludos compañeros, yo sufri bastante tiempo con ese asunto pero pude crear un archivo con la direccion de el puerto lpt1 y le imprimi directametnte a una epson tm-u220 y pude a su ves cortar el papel y abrir el cajon de dinero (Dynapos) te paso un componente que te servira para realizar este tipo de impresion, solo haste el .pas e instala el componente lo demas es facil
unit TicketPrinter; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,Printers,WinSpool; type TTicketPrinter = class(TComponent) private PRTPort : String;//PUERTO DONDE ESTA CONECTADA LA IMPRESORA PRTCutSTR : String;//SECUENCIA PARA EL CORET DE PAPEL PRTBoxSTR : String;//SECUENCIA PARA EL ABRIR LA CAJA DE DINERO PRTOpen : Boolean;//BANDERA PARA SABER SI HABRE LA CAJA DE DINERO PRTCut : Boolean;//BANDERA PARA VER SI CORTA EL PAPEL PRTLines : TStrings; PRTFont : TFont; procedure SetLines(Value: TStrings); procedure SetFont(Value: TFont); protected public constructor Create(AOwner: TComponent); override; destructor Destroy; override; procedure Print; published property Lines : TStrings read PRTLines write SetLines; Property PrinterPort : String read PRTPort Write PRTPort ; Property CutStr : String read PRTCutSTR Write PRTCutSTR ; Property OpenStr : String read PRTBoxSTR Write PRTBoxSTR ; Property Cut : Boolean read PRTCut Write PRTCut; Property Open: Boolean read PRTOpen Write PRTOpen; Property Font: TFont read PRTFont write SetFont; end; procedure Register; {------------------------------------------------------------------------------} implementation {$R *.res} {------------------------------------------------------------------------------} procedure Register; begin RegisterComponents('DINAMIS',[TTicketPrinter]); end; {------------------------------------------------------------------------------} constructor TTicketPrinter.Create(AOwner: TComponent); begin inherited Create(AOwner); PRTLines := TStringList.Create; PRTFont := TFont.Create; PRTOpen := False; PRTCut := False; PRTPort := 'LPT1'; {ESTOS VALORES SON POR DEFECTO PARA LA SERIE DE IMPREOSRAS EPSON TM-U2XXXX} PRTBoxSTR := #27+'p0'+#100+#0;//ESTA SECUENCIA ABRE EL CAJON DE DINERO PRTCutSTR := #29+'V'+#66+#20;//ESTA SECUENCIA CORTA EL PAPEL end; destructor TTicketPrinter.Destroy; begin PRTLines.Free; PRTFont.Free; inherited Destroy; end; procedure TTicketPrinter.SetLines(Value: TStrings); begin PRTLines.Assign(Value); end; procedure TTicketPrinter.SetFont(Value: TFont); begin PRTFont.Assign(Value); end; procedure TTicketPrinter.Print; var Imp : TextFile; Ind : Word; begin if PRTPort <> '' then begin AssignFile(Imp,PRTPort); try Rewrite(Imp); for Ind := 0 to PRTLines.Count -1 do Writeln(Imp,PRTLines[Ind]); if PRTCut then Writeln(Imp,PRTCutSTR); if PRTOpen then Writeln(Imp,PRTBoxSTR); finally CloseFile(Imp); end end else MessageDLG('No se ha hasignado el puerto donde esta conectada la impresora',mtError,[mbok],0); end; end. |
La franja horaria es GMT +2. Ahora son las 04:34:07. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi