Ver Mensaje Individual
  #8  
Antiguo 23-11-2017
bucanero bucanero is offline
Miembro
 
Registrado: nov 2013
Ubicación: Almería, España
Posts: 208
Reputación: 11
bucanero Va camino a la fama
La ultima versión de la DLL es la misma que estoy utilizando yo, las pruebas las hice con la versión de 32 bits y con este PDF de ejemplo, el cual conseguí leer sin problemas:

http://www.ite.educacion.es/formacio...pdf/html11.pdf

la única diferencia respecto de tu código y el mio es que yo solo declaro las funciones en la parte de la INTERFACE, fuera del FORM

Código Delphi [-]
type
  TForm1  
    ...
  end;

  function GetPDFPageCount(const FileName:PWideChar):LongInt;  stdcall; external 'PDFtext.dll';
  function GetPDFText(const FileName: PWideChar;
    opt: LongInt=3;
    hw: LongInt=0;
    fast: LongInt=0;
    target: PWideChar=0;
    lspaces: LongInt=1;
    ptitel: PWideChar=0;
    pos:  LongInt=0;
    page: LongInt=0;
    clock: LongInt=0;
    blank: LongInt=0;
    ende: LongInt=0;
    wlist: LongInt=0): pWidechar; stdcall; external 'PDFtext.dll';

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var
  filename: string;
  texto: string;
begin
  if opendialog1.Execute then begin
    filename := opendialog1.FileName;
    texto := GetPdfText(PWideChar(filename));
    Memo1.Lines.Add(texto);
  end;
end;

end.
Responder Con Cita