Replies: 1 comment 3 replies
|
It is the same problem with easyocr, but at least there the documentation says it does not work with PDF. What is the --simplest-- way to do --full text extraction-- on PDF files in docling, WITHOUT using actual OCR? It should be possible, shouldn't it? |
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Environment:
Google Colab with
I have reached the point of suicidiality. I followed more tutorials, all of them different, to get a simple thing to work: Extract ANY text from a TEXT only pdf generated from a DOCX by SAVING as PDF (not printing).
The result is always the same:
Processing 123.pdf Downloading RapidOCR models (English only, ONNX) [INFO] 2025-11-09 14:27:30,669 [RapidOCR] base.py:22: Using engine_name: onnxruntime [INFO] 2025-11-09 14:27:30,688 [RapidOCR] main.py:53: Using /root/.cache/huggingface/hub/models--SWHL--RapidOCR/snapshots/1cfba2e90fc938db55889873735088de210cc173/PP-OCRv4/en_PP-OCRv3_det_infer.onnx [INFO] 2025-11-09 14:27:30,943 [RapidOCR] base.py:22: Using engine_name: onnxruntime [INFO] 2025-11-09 14:27:30,953 [RapidOCR] download_file.py:60: File exists and is valid: /usr/local/lib/python3.12/dist-packages/rapidocr/models/ch_ppocr_mobile_v2.0_cls_infer.onnx [INFO] 2025-11-09 14:27:30,957 [RapidOCR] main.py:53: Using /usr/local/lib/python3.12/dist-packages/rapidocr/models/ch_ppocr_mobile_v2.0_cls_infer.onnx [INFO] 2025-11-09 14:27:31,215 [RapidOCR] base.py:22: Using engine_name: onnxruntime [INFO] 2025-11-09 14:27:31,226 [RapidOCR] main.py:53: Using /root/.cache/huggingface/hub/models--SWHL--RapidOCR/snapshots/1cfba2e90fc938db55889873735088de210cc173/PP-OCRv3/en_PP-OCRv3_rec_infer.onnx WARNING:root:RapidOCR conversion failed for /content/drive/MyDrive/SharedForColab/brn temp/Technical information - TI01 - LAB - Pressure less heater.pdf: RapidOCR produced no textual content. [WARNING] 2025-11-09 14:28:21,920 [RapidOCR] main.py:123: The text detection result is empty WARNING:docling.models.rapid_ocr_model:RapidOCR returned empty result!calling code:
try: dl_doc = convert_with_rapid(pdf_path) # pause() if not document_has_text(dl_doc): raise ValueError('RapidOCR produced no textual content.')implementation:
`def convert_with_rapid(pdf_path: Path) -> DoclingDocument:
All reactions