I need to encode a pdf document to base64 in Delphi6. Can anyone help me?
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);