Lectura del TEXTO desde archivo PDF

Lectura del TEXTO desde archivo PDF

Postby jnavas » Mon Dec 18, 2023 9:12 pm

Saludos
Necesitamos leer el contenido del texto de un archivo PDF, necesario para lectura de asientos contables, el usuario desea evitar la transcripción de miles de asientos contables.
User avatar
jnavas
 
Posts: 472
Joined: Wed Nov 16, 2005 12:03 pm
Location: Caracas - Venezuela

Re: Lectura del TEXTO desde archivo PDF

Postby Jimmy » Tue Dec 19, 2023 1:23 am

hi,

as i can say you need to extract TEXT from PDF

there are Tools, like xPDFreader, which can extract TEXT from PDF
https://www.xpdfreader.com/download.html
---
you can use Source of xPDFreader and try to use it direct under harbour
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1584
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: Lectura del TEXTO desde archivo PDF

Postby Antonio Linares » Tue Dec 19, 2023 7:32 am

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Lectura del TEXTO desde archivo PDF

Postby nageswaragunupudi » Tue Dec 19, 2023 2:30 pm

This may not work with complex pdfs but works with simple pdfs
No harm trying
Code: Select all  Expand view
function pdf2txt( cPdf, cTxt )

   local oWord := WinWordObj()
   local oDoc

   cPdf  := cFileSetExt( cPdf, "pdf" )
   if File( cPdf )
      cPdf  := TrueName( cPdf )
      DEFAULT cTxt := cFileSetExt( cPdf, "txt" )

      oDoc  := oWord:Documents:Open( cPdf )
      oDoc:SaveAs2( cTxt, 2 ) // wdFormatText )
      oDoc:Close()

      FW_MEMOEDIT( cTxt )
   else
      ? cPdf + " not found"
      cTxt  := nil
   endif

return cTxt
 
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10247
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 59 guests