python PDF文件合并

桌面放了准备合并到四个pdf,分别命名为1.pdf,2.pdf,3.pdf,4.pdf,需要按1-2-3-4的顺序合并。

cmd安装 PyPDF2组件

pip install PyPDF2 -i https://pypi.tuna.tsinghua.edu.cn/simple

示例:

C:\Users\栗子>pip install PyPDF2 -i https://pypi.tuna.tsinghua.edu.cn/simple
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting PyPDF2
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/d6/30/c66ca33b3af655b8d4db0ebe6a0b6d6660612bd1533919bbf7b0ca982d47/PyPDF2-2.10.0-py3-none-any.whl (208 kB)
     |████████████████████████████████| 208 kB 726 kB/s
Collecting typing-extensions; python_version < "3.10"
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/ed/d6/2afc375a8d55b8be879d6b4986d4f69f01115e795e36827fd3a40166028b/typing_extensions-4.3.0-py3-none-any.whl (25 kB)
Installing collected packages: typing-extensions, PyPDF2
Successfully installed PyPDF2-2.10.0 typing-extensions-4.3.0

写一个py

你可能感兴趣的:(Python,python,开发语言,linux)