V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
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
wencan
V2EX  ›  Python

有没有开源程序,输出一个纯文本文件,文本的位置可指定

  •  
  •   wencan · 13 天前 · 945 次点击
    其实就是把文字 pdf 转为纯文本
    期望文本的位置不变
    7 条回复    2024-05-21 14:33:58 +08:00
    lilu0826
        1
    lilu0826  
       13 天前 via Android
    PDF 转 word?
    littlewing
        2
    littlewing  
       13 天前
    文本的位置不变 是什么意思
    aeof
        3
    aeof  
       13 天前
    都说是纯文本了,保存布局是不可能的吧。。除非这个 PDF 是纯上下线性布局,不然理论上是不是不可能实现?
    disorientatefree
        4
    disorientatefree  
       13 天前
    应该是想靠换行和空格尽量保留排版?
    hefish
        5
    hefish  
       13 天前
    别说 pdf2txt ,pdf2jpg 都给你安排的服服帖帖。。。
    disorientatefree
        6
    disorientatefree  
       13 天前   ❤️ 1
    pdftotext -layout

    https://manpages.debian.org/experimental/poppler-utils/pdftotext.1.en.html#:~:text=Pdftotext%20converts%20Portable%20Document%20Format,pdf%20to%20file.

    ```
    Maintain (as best as possible) the original physical layout of the text. The default is to ´undo' physical layout (columns, hyphenation, etc.) and output the text in reading order.
    ```
    wencan
        7
    wencan  
    OP
       13 天前
    @disorientatefree 要的就是这个效果。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   5142 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 09:37 · PVG 17:37 · LAX 02:37 · JFK 05:37
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.