-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Requested feature
It seems sprinkled across the Docling codebase is a magic number 72. For example, https://github.com/docling-project/docling/blob/v2.55.1/docling/pipeline/standard_pdf_pipeline.py#L200-L202.
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?
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.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request