推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
woshichuanqilz
V2EX  ›  Python

求一个可以无损转换 pdf 为图片文件的方法, 或者 ocr pdf 文件的方法, 命令行的形式?

  •  
  •   woshichuanqilz · Nov 20, 2017 · 3958 views
    This topic created in 3303 days ago, the information mentioned may be changed or developed.

    我的目的是想 ocr 的一个 pdf 文件, 用 python 调用的方式, 我是用了百度 ocr 的接口, 但是这个接口没有办法转换,pdf 文件,可以转换图片文件,嗯,所以我用了 mutool 这个东西去转换 pdf 文件为图片文件,但是问题是,转换过来的图片是比较模糊的,这个应该不利于 ocr 识别,所以我现在想了两个办法,有没有什么高清可以无损转换 pdf 文件的方法?或者有没有什么直接可以 ocr 这个 pdf 文件的方法?

    在这里先感谢各位了,

    6 replies  •  2017-11-21 17:36:02 +08:00
    ynyounuo
    ynyounuo
    Nov 20, 2017
    1
    tesseract
    bingod
    bingod
    Nov 20, 2017
    2
    GitHub 搜索 PyPDFOCR
    zhidian
    zhidian
    Nov 20, 2017❤️1
    3
    xpdf. 或者... 不需要批量处理? 用 pdf.io 在线处理.
    Forbidden
    Forbidden
    Nov 21, 2017❤️1
    5
    gs -sDEVICE=jpeg -sOutputFile=%09d.jpg -r300 -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -dBATCH -dNOPAUSE
    woshichuanqilz
    woshichuanqilz
    OP
    Nov 21, 2017
    6
    @zhidian 这个工具 ok 的 无损转换 谢谢
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   863 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 20:27 · PVG 04:27 · LAX 12:27 · JFK 15:27
    ♥ Do have faith in what you're doing.