Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Impresión
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

 
 
Herramientas Buscar en Tema Desplegado
  #2  
Antiguo 06-06-2014
engranaje engranaje is offline
Miembro
 
Registrado: may 2011
Posts: 163
Poder: 16
engranaje Va por buen camino
Te dejo aqui un procedimiento que puedes probar e igual te sirve de pista para seguir:
Código Delphi [-]
procedure MuestraInfoImpresora;

var
  Log : TstringList;
  i:integer;
  LeftWaste,
  TopWaste,
  TotalPageWidth,
  TotalPageHeight,
  PageWidth,
  PageHeight: integer;

  strDatosImpresora:string;

begin
  Log :=  tstringlist.create;
  try
  if printer.printers.count>0 then
  begin

    Log.add('printers.count > 0');

    try
      LeftWaste:=round(GetDeviceCaps(Printer.Handle,PHYSICALOFFSETX));
      Log.add('LeftWaste = ' + inttostr(LeftWaste));
    except
      Log.add('Error asignando LeftWaste');
    end;

    try
      TopWaste:=round(GetDeviceCaps(Printer.Handle,PHYSICALOFFSETX));
      Log.add('TopWaste = ' + inttostr(TopWaste));
    except
      Log.add('Error asignando TopWaste');
    end;

    try
      TotalPageWidth:=round(GetDeviceCaps(Printer.Handle,PHYSICALWIDTH));
      Log.add('TotalPageWidth = ' + inttostr(TotalPageWidth));
    except
      Log.add('Error asignando TotalPageWidth');
    end;

    try
      TotalPageHeight:=round(GetDeviceCaps(Printer.Handle,PHYSICALHEIGHT));
      Log.add('TotalPageHeight = ' + inttostr(TotalPageHeight));
    except
      Log.add('Error asignando TotalPageHeight');
    end;

    try
      PageWidth:=round(GetDeviceCaps(Printer.Handle,HorzRes)/
                        GetDeviceCaps(printer.Handle,LogPixelsX)*Screen.PixelsPerInch);
      Log.add('PageWidth = ' + inttostr(PageWidth));
    except
      Log.add('Error asignando PageWidth');
    end;

    try
      PageHeight:=round(GetDeviceCaps(Printer.Handle,VertRes)/
                       GetDeviceCaps(printer.Handle,LogPixelsY)*Screen.PixelsPerInch);
      Log.add('PageHeight = ' + inttostr(PageHeight));
    except
      Log.add('Error asignando PageHeight');
    end;

  end
  else
  begin
    Log.add('printers.count <= 0');
  end;

  for i := 0 to Log.count-1 do
  begin
    strDatosImpresora := strDatosimpresora +  #13  + Log.strings[i];
  end;

  MessageDlg(strDatosImpresora, mtInformation,[mbOk], 0);
  finally

  end;
end;
Hay que añadir al uses printers;
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
¿como Imprimir a varias impresoras'? JXJ Varios 8 17-05-2011 02:15:39
¿Cómo conocer por qué rebotó un mail? kokorini Internet 0 12-03-2008 12:39:42
Como conocer que funcion invoco a otra.... oracle JAVA 16 22-01-2008 05:05:40
¿Como Imprimir Rápido en QReport usando Impresoras Matriciales? AGAG4 Impresión 13 19-08-2006 03:32:08


La franja horaria es GMT +2. Ahora son las 08:05:04.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi