docling-project / docling-project/docling

OCR in .docx not Working

Open
#1,880 2 comments 0 reactions 0 assignees View on GitHub
enhancement triage/close-stale
Dominant language
Python
Stars
66.4k
Forks
4.8k
Avg merge
2d 21h
Merged PRs (30d)
84

Description

### Bug
No OCR is working for images inside of a .docx. When i export that docx as a pdf, then it works.
...

### Steps to reproduce
Here is a random picture placed inside a .docx and a .pdf file. I create the .pdf using word `file > save as > pdf`.

Example Files:
[Doc1.pdf](https://github.com/user-attachments/files/21010476/Doc1.pdf)
[Doc1.docx](https://github.com/user-attachments/files/21010475/Doc1.docx)

### Instalation:
```
version: "3.8"

services:
open-webui:
image: ghcr.io/open-webui/open-webui:dev-cuda
container_name: open-webui
restart: always
ports:
- "3000:8080"
volumes:
- open-webui:/app/backend/data
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
DEVICE_TYPE: "cuda"
AUDIO_TTS_OPENAI_API_KEY: "ShrekIsmylover"
AUDIO_TTS_ENGINE: "openai"
AUDIO_TTS_OPENAI_API_BASE_URL: "http://host.docker.internal:5050"
CONTENT_EXTRACTION_ENGINE: "docling"
DOCLING_OCR_LANG: "eng,por"
DOCLING_OCR_ENGINE: "tesseract"
WEBUI_SECRET_KEY: "Damn9D4niel8Cake7Love34"
DOCLING_SERVER_URL: "http://host.docker.internal:5001"
gpus: all

openai-edge-tts:
image: travisvn/openai-edge-tts:latest
container_name: openai-edge-tts
labels:
group: OpenWebUi
ports:
- "5050:5050"
environment:
API_KEY: "ShrekIsmylover"
PORT: "5050"
DEFAULT_VOICE: "en-US-AndrewMultilingualNeural"
DEFAULT_RESPONSE_FORMAT: "mp3"
DEFAULT_SPEED: "1.0"
DEFAULT_LANGUAGE: "en-US"
REQUIRE_API_KEY: "True"
REMOVE_FILTER: "False"
EXPAND_API: "True"

docling:
image: quay.io/docling-project/docling-serve-cu124
container_name: docling
labels:
group: OpenWebUi
ports:
- "5001:5001"
environment:
DOCLING_SERVE_ENABLE_REMOTE_SERVICES: "true"
DOCLING_SERVE_ENABLE_UI: "true"
DOCLING_SERVE_ARTIFACTS_PATH: "/modelcache"
DOCLING_SERVE_DEFAULT_DO_OCR: "true"
DOCLING_SERVE_DEFAULT_FORCE_OCR: "true"
DOCLING_SERVE_DEFAULT_FORCE_FULL_PAGE_OCR: "true"
DOCLING_SERVE_DEFAULT_OCR_ENGINE: "tesseract"
DOCLING_SERVE_DEFAULT_OCR_LANG: "eng,por"

volumes:
- docling-model-cache:/modelcache
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]

volumes:
open-webui:
external: true
name: open-webui

docling-model-cache:

```

Then
`docker exec -it -u 0 docling bash`

Then
`docling-tools models download --output-dir /modelcache --all`
...

### Docling version
```
((app-root) ) bash-5.1# docling --version
Docling version: 2.38.0
Docling Core version: 2.38.1
Docling IBM Models version: 3.6.0
Docling Parse version: 4.1.0
Python: cpython-312 (3.12.10)
Platform: Linux-6.6.87.2-microsoft-standard-WSL2-x86_64-with-glibc2.34
```
...

### Python version
```
((app-root) ) bash-5.1# python --version
Python 3.12.10
```
...

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.