创建PDF内容 [英] Create contents of PDF

查看:55
本文介绍了创建PDF内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要创建PDF内容.

解决方案

  1. 使用 pdftotext ( xpdf )将pdf文件转储到文本文件.您可以使用 subprocess.call 通过Python脚本进行调用. /p>

  2. 使用 collections.Counter.most_common ntlk 查找最常见的单词:

    import collections
    keywords = collections.Counter(open(<...>).read()).most_common(20)
    

  3. 请参阅此问题.

I need to create an contents of PDF.

解决方案

  1. Use pdftotext (which comes with xpdf) to dump your pdf file to a text file. You can call this through a Python script using subprocess.call.

  2. Use collections.Counter.most_common or ntlk to find the most common words:

    import collections
    keywords = collections.Counter(open(<...>).read()).most_common(20)
    

  3. See this question.

这篇关于创建PDF内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆