🔍 OCR API Reference
This page is currently only available in Chinese. Please switch to 简体中文 for the full content.
🔍 OCR API Reference
Sub-package:
poocr| Install:pip install poocrImport:import officeorimport poocr
VatInvoiceOCR2Excel
office.ocr.VatInvoiceOCR2Excel(
input_path,
output_path='./',
output_excel='VatInvoiceOCR2Excel.xlsx',
img_url=None,
id=None,
key=None,
file_name=False,
trans=False
)
Parameters
| Parameter | Type | Description |
|---|---|---|
input_path | str | Invoice image path or folder |
output_path | str | Output directory |
output_excel | str | Output Excel name |
img_url | str | Image URL |
id / key | str | Baidu API credentials |
file_name | bool | Use filename as sheet name |
trans | bool | Translate to English |
Examples
import office
office.ocr.VatInvoiceOCR2Excel(
input_path='./invoice.jpg',
output_path='./output/'
)
office.ocr.VatInvoiceOCR2Excel(
input_path='./invoices/',
output_path='./output/',
output_excel='all_invoices_summary.xlsx',
file_name=True
)