【发布时间】:2017-08-22 09:02:58
【问题描述】:
使用python,我想convert a pdf file into base64Binary
我的逻辑(不是 python)将文件的内容读入字节数组,然后使用类似Convert.ToBase64String() method 的东西来获取Base64 string:
byte[] pdfBytes = File.ReadAllBytes(pdfPath);
string pdfBase64 = Convert.ToBase64String(pdfBytes);
请告诉我在 python 中convert a pdf file into base64Binary 的正确方法是什么
【问题讨论】:
-
这不是 Python
-
我已经编辑了我的帖子。如果还有什么不清楚的地方请告诉我
标签: python python-2.7 python-3.x pdf ipython