Pdf a Base64

Post Reply
servicomver
Posts: 192
Joined: Fri Nov 18, 2005 7:34 pm

Pdf a Base64

Post by servicomver »

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
User avatar
karinha
Posts: 7910
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Been thanked: 3 times
Contact:

Re: Pdf a Base64

Post by karinha »

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
Enrico Maria Giordano
Posts: 8734
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Been thanked: 1 time
Contact:

Re: Pdf a Base64

Post by Enrico Maria Giordano »

Code: Select all | Expand

cTxt = MEMOREAD( cPdf )
cBase4 = HB_BASE64ENCODE( cTxt, LEN( cTxt ) )
User avatar
leandro
Posts: 1719
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia
Has thanked: 11 times
Been thanked: 3 times
Contact:

Re: Pdf a Base64

Post by leandro »

Otra forma

Code: Select all | Expand

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 24.09 ] [ xHarbour 64 bits) ]
Post Reply