python - 使用 Python 编辑 pdf 中的信息
问题描述
我需要使用 Python 编辑 pdf 文件中的一些信息。有图书馆可以做吗?我试过'PyPDF2'和'Reportlab'但没有运气。
解决方案
尝试类似:
from PyPDF2 import PdfFileReader, PdfFileWriter
fin = open('source.pdf', 'rb')
reader = PdfFileReader(fin)
writer = PdfFileWriter()
或咨询以下网站: https ://www.binpress.com/manipulate-pdf-python/
https://www.blog.pythonlibrary.org/2018/06/06/creating-and-manipulating-pdfs-with-pdfrw/
让我知道这是否有帮助,因为您的问题更像是一个开放式问题。
推荐阅读
- c# - 我如何为文本文件中的一行提供唯一标识符?
- python - Pandas - 结合重采样值续
- java - 迁移到 Jboss EAP7 时出现 WELD 异常
- javascript - 在 Node.js 和 Mongoose 中从二进制文件重新创建图像
- .net - 一个不寻常的 AutoMapper 映射案例:是否可以设置一个高优先级的通用约定?
- python - Django 模型的名称错误
- javascript - 如何重命名mongodb atlas中已经存在的集合?
- c# - UWP Toast (AdaptiveImage) 不显示扩展名为 jpg 格式的图像
- python - 为什么 python3.7 sys.path 不像 python2.7 那样包含 PYTHONPATH ?
- java-8 - 如何限制 Stream API 表达式返回的元素数量