docling-project / docling-project/docling
Request: expose DPI to image scale constant of `72`
Open
enhancement
- Dominant language
- Python
- Stars
- 66.4k
- Forks
- 4.8k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 84
Description
### Requested feature
It seems sprinkled across the Docling codebase is a magic number 72. For example, .
https://docling-project.github.io/docling/examples/export_multimodal/ mentions:
> `IMAGE_RESOLUTION_SCALE`: page rendering scale (1 ~ 72 DPI).
In my own code, I work with DPI. So I need to convert DPI to `image_scale` for `PdfPipelineOptions`. Can Docling expose this as an importable constant?
```python
IMAGES_SCALE_PER_DPI: int = 72
dpi = 144
print(dpi / IMAGES_SCALE_PER_DPI) # 2
```
### Alternatives
Redefining the conversion constant 72 in my own code, which is the workaround.
Contributor guide
Assessment
This issue has not been assessed yet.