Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to encode base64 in Delphi 6? [duplicate]

I need to encode a pdf document to base64 in Delphi6. Can anyone help me?

like image 967
user1984193 Avatar asked Oct 19 '25 02:10

user1984193


1 Answers

You can use the EncdDecd unit that is supplied with Delphi. The function you need is EncodeStream. You simply need to create two streams, one for input and one for output. If you are working with files then you should create TFileStream instances.

Once you have your two file streams created, all you need is:

EncodeStream(InputStream, OutputStream);
like image 61
David Heffernan Avatar answered Oct 22 '25 05:10

David Heffernan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!