Ver Mensaje Individual
  #6  
Antiguo 03-07-2013
Avatar de nlsgarcia
[nlsgarcia] nlsgarcia is offline
Miembro Premium
 
Registrado: feb 2007
Ubicación: Caracas, Venezuela
Posts: 2.206
Reputación: 23
nlsgarcia Tiene un aura espectacularnlsgarcia Tiene un aura espectacular
steelha,

Continuación del Msg #5:

Revisa este link:
Cita:
Empezado por Quick PDF Library:
Esta función te permitirá extraer el texto de un documento pdf, sin embargo no esta disponible en Quick PDF Library Lite (Versión Free), pero si en la Quick PDF Library (Versión Trial).

Revisa este código:
Código Delphi [-]
procedure TForm1.Button1Click(Sender: TObject);
var
   InputFileName : String;
   Password : String;
   Page, Options : Integer;
   OuputFileName : TStringList;
   TextPdf : WideString;
   PDFLibrary : TDebenuPDFLibrary0914;
   UnlockResult : Integer;

begin
   PDFLibrary := TDebenuPDFLibrary0914.Create;
   try
      UnlockResult := PDFLibrary.UnlockKey(TrialKey); // TrialKey es un String con la clave temporal de 30 días del demo.
      if UnlockResult = 1 then
      begin
         InputFileName := 'Test_Document.pdf';
         Password:= '';
         Page := 1; 
         Options := 8; 
         TextPdf := PDFLibrary.ExtractFilePageText(InputFileName, Password, Page, Options);
         OuputFileName := TStringList.Create;
         OuputFileName.Add(TextPdf);
         OuputFileName.SaveToFile('Test_Document.txt');
         OuputFileName.Free;
      end
      else
         ShowMessage('Licencia Invalida');
   finally
      PDFLibrary.Free;
   end;
end;
El código anterior es un ejemplo de extracción de texto de un documento PDF con Quick PDF Library (Versión Trial), te sugiero probar esta versión, quizás sirva de base para considerar su adquisición en tu organización.

Otra opción sería salvar el archivo PDF como texto con la opción File -> Save As Other -> Text de Acrobat Reader, lo cual quizás requiera algunos ajustes en tu programa de procesamiento de archivo de texto.

Espero sea útil

Nelson.

Última edición por nlsgarcia fecha: 03-07-2013 a las 09:47:09.
Responder Con Cita