Pdf a Base64

Pdf a Base64

Postby servicomver » Wed Feb 14, 2024 6: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
servicomver
 
Posts: 190
Joined: Fri Nov 18, 2005 7:34 pm

Re: Pdf a Base64

Postby karinha » Wed Feb 14, 2024 7:52 pm

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7822
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Pdf a Base64

Postby Enrico Maria Giordano » Wed Feb 14, 2024 8:53 pm

Code: Select all  Expand view
cTxt = MEMOREAD( cPdf )
cBase4 = HB_BASE64ENCODE( cTxt, LEN( cTxt ) )
User avatar
Enrico Maria Giordano
 
Posts: 8714
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Pdf a Base64

Postby leandro » Wed Feb 14, 2024 9:05 pm

Otra forma
Code: Select all  Expand view

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) ]
User avatar
leandro
 
Posts: 1676
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 41 guests