Base64 encode and decode

I want a file(pdf or image) to be encoded and further decode … How can I do that? If you have any documentation for both… Please help me out
1 answers

You’ll need to download the Community Commons module from the Marketplace.

In there you’ll find Base64DecodeToFile and Base64EncodeToFile that should do exactly what you need. 

Hope this helps