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: 7885
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
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: 8728
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
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: 1688
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia
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

[ Embarcadero C++ 7.60 for Win32 ] [ FiveWin 23.07 ] [ xHarbour 1.3.0 Intl. (SimpLex) (Build 20230914) ]
Post Reply