📜  将pdf转换为base64 python代码示例

📅  最后修改于: 2022-03-11 14:47:01.787000             🧑  作者: Mango

代码示例1
# credit to the Stack Overflow user in the source link

import base64

with open("book.pdf", "rb") as pdf_file:
    encoded_string = base64.b64encode(pdf_file.read())