Ver Mensaje Individual
  #1  
Antiguo 05-10-2005
Avatar de AGAG4
AGAG4 AGAG4 is offline
Miembro
 
Registrado: ago 2004
Ubicación: Los Mochis, Sinaloa, México
Posts: 1.420
Reputación: 23
AGAG4 Va por buen camino
Problema al imprimir la Ñ .

Tengo la siguiente función en delphi donde mando a imprimir un archivo de texto a una impresora matricial, no imprime la Ñ ó ñ, me imprime un caracter raro Ð, abro el mismo archivo de texto en el bloc de notas y si aparece la Ñ y si imprimo en el ms-dos(copy File.txt \\PC\Print) el archivo de texto no me imprime la Ñ me imprime el mismo signo raro Ð:
Código Delphi [-]
function SpoolFile(const FileName, PrinterName: string): Integer;
var
Buffer: record
JobInfo: record // ADDJOB_INFO_1
Path: PChar;
JobID: DWORD;
end;
PathBuffer: array[0..255] of Char;
end;
SizeNeeded: DWORD;
Handle: THandle;
PrtName: string;
ok: Boolean;
begin
// Flush job to printer
PrtName := PrinterName;
if PrtName = '' then
PrtName := Printer.Printers[Printer.PrinterIndex]; // Default printer name
ok := False;
if OpenPrinter(PChar(PrtName), Handle, nil) then
if AddJob(Handle, 1, @Buffer, SizeOf(Buffer), SizeNeeded) then
if CopyFile(PChar(FileName), Buffer.JobInfo.Path, True) then
if ScheduleJob(Handle, Buffer.JobInfo.JobID) then
ok := True;
if not ok then
Result := GetLastError
else
Result := 0;
end;
Esta función lo que me sirve es tomar el archivo y mandar a cierta impresora dependiendo del nombre de la misma.

Agradezco cualquier sugerencia

Última edición por AGAG4 fecha: 06-10-2005 a las 00:53:24.
Responder Con Cita