Ver Mensaje Individual
  #4  
Antiguo 15-05-2015
shoulder shoulder is offline
Miembro
 
Registrado: abr 2008
Posts: 441
Reputación: 19
shoulder Va por buen camino
Pdf

Gracias por responder, encontre lo que necesitaba en un antiguo Post de Ecfisa y me viene bien para saber si un PDF esta dañado y funciona muy bien. Dejo lo que habia publicado ecfisa.

Código Delphi [-]
function IsPDFFile(aFileName: TFileName): Boolean;
var
  Buf: array[0..3] of byte;
  Stream: TFileStream;
begin
  with TFileStream.Create(aFileName, fmOpenRead) do
  try
    Read(Buf, SizeOf(Buf));
    Result:= (Buf[0]=$25) and (Buf[1]=$50) and (Buf[2]=$44) and (Buf[3]=$46);
  finally
    Free;
  end;
end;

Última edición por nlsgarcia fecha: 15-05-2015 a las 15:28:25. Razón: Sintaxis Delphi
Responder Con Cita