FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Pdf a Base64
Posts: 198
Joined: Fri Nov 18, 2005 07:34 PM
Pdf a Base64
Posted: Wed Feb 14, 2024 06:58 PM

Hola, ¿ como puedo convertir un archivo PDF a Base64 ? desde xHarbour, he leído que necesito una librería, donde puedo descargarla ?

Gracias por su ayuda, saludos

Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Pdf a Base64
Posted: Wed Feb 14, 2024 07:52 PM
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Pdf a Base64
Posted: Wed Feb 14, 2024 08:53 PM
Code (fw): Select all Collapse
cTxt = MEMOREAD( cPdf )
cBase4 = HB_BASE64ENCODE( cTxt, LEN( cTxt ) )
Posts: 1816
Joined: Wed Oct 26, 2005 02:49 PM
Re: Pdf a Base64
Posted: Wed Feb 14, 2024 09:05 PM
Otra forma
Code (fw): Select all Collapse
local cText := space(0)
local rutapdf := ".\pdfs\"+Retorna_Caracter(vCsc)+".pdf"
local rutaTXT := ".\pdfs\"+Retorna_Caracter(vCsc)+".txt"

//CONVERTIMOS EL PDF A CADENA DE TEXTO BASE 64
fMimeEnc( rutaPDF, rutaTXT )
cText := MemoRead( rutaTXT )
cText := STRTRAN(cText,CRLF,'')
Saludos
LEANDRO AREVALO
Bogotá (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Turbo Incremental Link64 6.98 Embarcadero 7.70 ] [ FiveWin 25.01 ] [ xHarbour 64 bits) ]

Continue the discussion