We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 9 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(7)
您好,我认为您不需要为您的目的编写程序,我的意思是在控制台模式下阅读 pdf 文件,因为
less
命令已经为您完成了。所以使用它并享受它吧。Hi I think that you don't need to write a program for your purpose I mean reading pdf file in console mode because
less
command already do it for you. So use it and just enjoy it.好吧,你甚至要求知道“蹩脚”的。这里有两个(你自己决定他们各自的蹩脚程度):
第一:Ghostscript的
txtwrite
输出设备第二:XPDF 的
pdftotext
CLI 实用程序(比 Ghostscript 更好):这将显示页面范围 13(第一页)到 17(最后一页) ,保留受双密码保护的命名 PDF 文件的布局(使用用户和所有者密码秘密和超级秘密),采用 Unix EOL 约定,但不在 PDF 页面之间插入分页符,通过 less...
pdftotext -h
显示所有可用的命令行选项。当然,这两种工具仅适用于 PDF 的文本部分(如果有的话)。哦,数学公式也不能很好地工作...;-)
编辑:我错误地输入了上面的命令(最初使用
pdftops
而不是pdftotext
)。Ok, you asked to know even "crappy" ones. Here are two (decide yourself about their respective crappiness):
First: Ghostscript's
txtwrite
output deviceSecond: XPDF's
pdftotext
CLI utility (better than Ghostscript):This will display the page range 13 (first page) to 17 (last page), preserve the layout of a double-password protected named PDF file (using user and owner passwords secret and supersecret), with Unix EOL convention, but without inserting pagebreaks between PDF pages, piped through less...
pdftotext -h
displays all available commandline options.Of course, both tools only work for the text parts of PDFs (if they have any). Oh, and mathematical formula also won't work too well... ;-)
Edit: I had mis-typed the command above (originally using
pdftops
instead ofpdftotext
).还有绿色 PDF 查看器。 YouTube 上有一个演示。
There is also the green PDF viewer. There is a demo on YouTube.
顺便说一句,我总是处于同样的情况,我使用 mc(午夜指挥官),它可以很好地处理文本 pdf...
只需在mc中查看文件(F3)
By the way, i m always in the same situation, and I use mc (midnight commander) which handles text pdf's very well...
Just view the file (F3) in mc
尝试
fbgs
,它应该由fbi
或fbida
包提供,具体取决于您的发行版。请注意,它仅在真实终端(ttys)中工作。Try
fbgs
, which should be provided by thefbi
orfbida
package depending on your distribution. Note that it only works in real terminals (ttys).http://web.archive.org/web/20150316143120/http://linuxers.org/howto/how-open-pdf-files-linux-console-using-fbgs-framebuffer-pdf-viewer
fbpdf 是一个帧缓冲 pdf 查看器。
还有一个叉子,jfbpdf,但目前我无法让它工作。
fbpdf is a framebuffer pdf viewer.
There is also a fork, jfbpdf, but at the moment I am not able to get it working.
仅当您的 PDF 文档是结构化的,即它是 时,此功能才有效带标签的 PDF 文档。
这是获得文档中文本对象的正确阅读顺序所必需的。
带标签的 PDF 文档还允许您重新排列文档,尽管我不知道有任何工具可以使用命令行输出执行此操作。
This would only work if your PDF document is structured, i.e. it is a tagged PDF document.
This is required to get the correct reading-order of the text objects in the document.
Tagged PDF documents also allow your to re-flow the document though I am not aware of any tool doing that with command line output.