139 Star 667 Fork 256

mktime/python-learn

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
downloads
images
models
qsbk
.gitignore
2.png
ExcelHelper.py
FSM.py
LICENSE
README.md
SSEncrypt.module
ai-agent.py
arch-install.md
audio-rtmp.py
auto_build.py
baidu_ocr.py
balance_config.ini
balance_query.py
balance_query_batch.txt
bencode.py
bloom_1.cpp
bloom_1.py
bloom_2.py
capture-camera.py
check_https_domain_exp_date.py
cnn-demo.py
contacts.xml
crack_test.py
crack_wifi.txt
data-structure.py
dcm2jpg.py
decrypt_remmina.py
delicious.md
delicious.xml
demo.c
dht_client.py
dou2.py
download.py
egcd.py
export_delicious.sh
face-detect.py
fetchurl.py
find_repeat.py
findbig.py
five-elements.py
flv2mp4.py
get_bookmarks.py
get_version.py
gpt35.py
howto_terminate_thread.py
http_proxy.py
i3_config
import_ess_picture.py
ipfind.py
joseph-cycle.py
kimi.py
learn-class.py
learn-docker.md
learn-thread.py
learn_thread.py
linux-tips.md
merge_excel.py
monitor.sh
mydict.py
mysql_init.sql
new.txt
ocr_words.py
orm.py
parse_excel.py
parse_json.py
payload.py
pm25.py
print_ascii.py
problem.py
python-learn-1.py
python-learn-2.py
qiubai.py
remote.sh
repeated.sql
rpc_server.py
scan.py
scan2.py
score.py
screen.sh
send_fangtang.py
sina_user.json
smz_report.py
sock5.py
sock_client.py
sock_serv.py
start-audio.sh
sync_aliyun.py
system_update.py
template.xml
test_img2pdf.py
test_pdf2images.py
torrent_client.py
totp.py
tray.py
update.ico
urls.txt
v2ex.py
v2ex.txt
wifi-keep.sh
wind_crawl.py
x_test.npy
x_train.npy
xml2vcf.py
y_test.npy
y_train.npy
克隆/下载
test_pdf2images.py 605 Bytes
一键复制 编辑 原始数据 按行查看 历史
内部项目 提交于 4年前 . 增加sorted用法
import fitz
import os
'''
pip install fitz
pip install PyMuPDF
'''
# 调整zoom_x/zoom_y 可以调整图片清晰度
def pdf_image(pdfPath,imgPath,zoom_x,zoom_y,rotation_angle):
pdf = fitz.open(pdfPath)
for pg in range(0, pdf.pageCount):
page = pdf[pg]
trans = fitz.Matrix(zoom_x, zoom_y).preRotate(rotation_angle)
pm = page.getPixmap(matrix=trans, alpha=False)
pm.writePNG(imgPath+str(pdfPath)+"_" + str(pg) + ".png")
pdf.close()
data = [x for x in os.listdir('.') if x.endswith('.PDF')]
for i in data:
print(i)
pdf_image(i, "..\\output\\",1,1,0)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/mktime/python-learn.git
git@gitee.com:mktime/python-learn.git
mktime
python-learn
python-learn
master

搜索帮助