ethanlu
V2EX  ›  问与答

有没有什么语言可以对 PDF 有这样的操作?

  •  
  •   ethanlu · Jun 17, 2017 · 2219 views
    This topic created in 3275 days ago, the information mentioned may be changed or developed.
    查找 PDF 里面的内容,比如 date:2017-6-16,找到 date 然后把 2017-6-16 提取出来?
    5 replies    2017-06-17 17:51:02 +08:00
    xycool
        1
    xycool  
       Jun 17, 2017 via iPhone
    用正则都行吧?
    ethanlu
        2
    ethanlu  
    OP
       Jun 17, 2017
    If AVDoc.FindText(TextToFind, True, True, False) = False Then
    。。。。。

    TextToFind 就是要找的内容,正则需要 API 支持吗?
    Kirscheis
        3
    Kirscheis  
       Jun 17, 2017
    这和语言没有关系,随便什么语言都可以。有 pdf 解析库的语言方便一些,比如 java、python。
    当然,也可以先调用 poppler-utils 之类东西 extract,再用任何语言处理
    jugelizi
        4
    jugelizi  
       Jun 17, 2017
    首先你得把文件内容解析出来
    语言都是放风筝的事
    ethanlu
        5
    ethanlu  
    OP
       Jun 17, 2017
    我公司能让我用的编程工具只有 Excel VBA,我需要在 VBA 里面调用 adobe acrobat reader 的 API 去查找,TextToFind 变成\d{4}-\d{2}-\d{2}这样的正则就能行?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2646 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 42ms · UTC 15:33 · PVG 23:33 · LAX 08:33 · JFK 11:33
    ♥ Do have faith in what you're doing.