Skip to main content

Tools of extracting PDF content based on RapidOCR

Project description

RapidOCRPDF

  • 依托于RapidOCR仓库,快速提取PDF中文字,包括扫描版PDF、加密版PDF。
  • 暂不包括版式还原。

使用

  1. 安装rapid_ocr_pdf
    # 基于rapidocr_onnxruntime
    pip install rapid_ocr_pdf[onnxruntime]
    
    # 基于rapidocr_openvino
    pip install rapidocr_pdf[openvino]
    
  2. 使用方式
    from rapidocr_pdf import PDFExtracter
    
    pdf_extracter = PDFExtracter()
    
    pdf_path = 'tests/test_files/direct_and_image.pdf'
    texts = pdf_extracter(pdf_path)
    print(texts)
    
  3. 输入输出说明
    • 输入Union[str, Path, bytes]
    • 输出List [页码, 文本内容 + 置信度], 具体参见下例:
      [
          ['0', '达大学拉斯维加斯分校)的一次中文评测中获得最', '0.8969868'],
          ['1', 'ABCNet: Real-time Scene Text Spotting with Adaptive Bezier-Curve Network∗\nYuliang Liu‡†', '0.8969868'],
      ]
      

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

rapidocr_pdf-0.0.1-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file rapidocr_pdf-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for rapidocr_pdf-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 809f4b655ab6fc8bc3b670c7224295ae1969ec9ba6a784dd49b1e96de9fa6b54
MD5 576605646fdcd87693065044ec03dd2b
BLAKE2b-256 c4d1f8e78626a4ece1d3530799c6236c091e6e2e65cf9e3b95adddc9995aa7cf

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page