Decoding a Base64 string to PDF-document (2005-2010)
Posts: 14
Joined: 23 Nov 2017, 15:59
Location: Stockholm/Sweden

Decoding a Base64 string to PDF-document

Post by LarsAke » 25 Feb 2009, 20:08

 Posted by:  Lars-Åke Abrahamsson 

I am getting a Base64 binary string from webservice and should decoding and
saving it as a PDF-document. It doesn't work with Jeff L function
oBase64.DecodeBase64 (can't handle binary nulls what I understand) so I need
another solution.

I am using TD 5.1 sp 4.

Can anybody help me?


Jeff Luther
Site Admin
Site Admin
United States of America
Posts: 2371
Joined: 04 Mar 2017, 18:34
Location: Palm Springs, California

Decoding a Base64 string to PDF-document

Post by Jeff Luther » 26 Feb 2009, 02:36

 Posted by:  Jeff Luther 

The oBase64.DecodeBase64 doesn't work because, unfortunately, TD can't
handle a binary null "0x00" embedded in a buffer. I found this out some time
ago in another circumstance.

"help" -- all I can suggest is finding something on the web that will take
base 64 and handle nulls ok.

One place to look is CryptoSys:
I know their set of API routines include encode/decode base64.

- Jeff L./Unify Corp.

Krzysztof Dorko

Decoding a Base64 string to PDF-document

Post by Krzysztof Dorko » 26 Feb 2009, 23:54

 Posted by:  Krzysztof Dorko 

Look for SMTP solution provided by Stefan Beltrame. He even updated it
recently to the 5.1 version.
It is of course much more then only Base64 but in order to send/read emails
using SMTP you have to convert everything to or from base64 (including
attachments). It is written in c++ but all sources are provided so you
should not have any problem with adding id to your app.



Return to “td.development”

Who is online

Users browsing this forum: [Ccbot] and 0 guests