创建PDF内容 [英] Create contents of PDF
本文介绍了创建PDF内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要创建PDF内容.
解决方案
-
使用
pdftotext
(xpdf
)将pdf文件转储到文本文件.您可以使用subprocess.call
通过Python脚本进行调用. /p> -
使用
collections.Counter.most_common
或ntlk
查找最常见的单词:import collections keywords = collections.Counter(open(<...>).read()).most_common(20)
-
请参阅此问题.
I need to create an contents of PDF.
解决方案
Use
pdftotext
(which comes withxpdf
) to dump your pdf file to a text file. You can call this through a Python script usingsubprocess.call
.Use
collections.Counter.most_common
orntlk
to find the most common words:import collections keywords = collections.Counter(open(<...>).read()).most_common(20)
See this question.
这篇关于创建PDF内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文