Using python, I want to convert a pdf file into base64Binary
My logic(not python) is reading the contents of the file into a byte array and then use something like Convert.ToBase64String() method to get the Base64 string:
byte[] pdfBytes = File.ReadAllBytes(pdfPath);
string pdfBase64 = Convert.ToBase64String(pdfBytes);
Please let me know what is the right approach to convert a pdf file into base64Binary in python
 
     
     
     
    