Convert PDF to Base64

Xbase++ 2.0 Build 554 or later
Message
Author
User avatar
Tom
Posts: 1165
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Convert PDF to Base64

#11 Post by Tom »

Hi, Pedro.

It's exactly the same result.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
PedroAlex
Posts: 229
Joined: Tue Feb 09, 2010 3:06 am

Re: Convert PDF to Base64

#12 Post by PedroAlex »

Tom,
What's your Alaska xBase++ version?
Pedro Alexandre

User avatar
Tom
Posts: 1165
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Convert PDF to Base64

#13 Post by Tom »

2.0.1400

But there is no different behaviour in older versions of 2.0.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
PedroAlex
Posts: 229
Joined: Tue Feb 09, 2010 3:06 am

Re: Convert PDF to Base64

#14 Post by PedroAlex »

Tom,
You're right.
Bin2Base64 works well.
My problem was this line of code.

Code: Select all

cB64 := Bin2Base64( cStream )
MsgBox( 'CB64 ' + cB64 ,'PDF to Base64')
Msgbox () is unable to display the string with the result.

Many thanks.

Note : Here in my country we have to start sending the invoices by EDI (Electronic Delivery Invoice) and this function is necessary to attach the Pdf to the file in UBL2.1.
Pedro Alexandre

User avatar
unixkd
Posts: 565
Joined: Thu Feb 11, 2010 1:39 pm

Re: Convert PDF to Base64

#15 Post by unixkd »

Hi Gradosic

I could not find the function - ToBase64() in OT4XB.DLL.

It is not equally available in the dll i downloaded from your link

I use ot4xb.dll a lot.

Thanks

Joe

User avatar
Auge_Ohr
Posts: 1405
Joined: Wed Feb 24, 2010 3:44 pm

Re: Convert PDF to Base64

#16 Post by Auge_Ohr »

hi,
gradosic wrote: Tue Apr 20, 2021 4:12 am It's ot4xb library, you can find it on https://www.dll-files.com/ot4xb.dll.html..
i recommend only to use Files, with Source, direct from Pablo Botella
https://blog.xbwin.com/

---

like Joe i can´t find ToBase64() in Ot4xb ...
greetings by OHR
Jimmy

User avatar
Tom
Posts: 1165
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Convert PDF to Base64

#17 Post by Tom »

There is no ToBase64() in OT4XB. That is/was an ASINET-function.

Use Bin2Base64() from Xbase++ directly or xbBase64Encode() from Xb2.Net.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
unixkd
Posts: 565
Joined: Thu Feb 11, 2010 1:39 pm

Re: Convert PDF to Base64

#18 Post by unixkd »

Thanks Tom and Jimmy, that clarification is very necessary.

The xb2Net function works perfectly.

Joe

Post Reply