docling-project / docling-project/docling
Docling lost the link URLs embedded in the text while parsing the PDF content.
- Dominant language
- Python
- Stars
- 66.4k
- Forks
- 4.8k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 84
Description
### Bug
Docling lost the link URLs embedded in the text while parsing the PDF content.
...
### Steps to reproduce
input_doc_path = Path("Test Docling.pdf")
pipeline_options = PdfPipelineOptions()
pipeline_options.do_ocr = True
pipeline_options.do_table_structure = True
pipeline_options.table_structure_options.do_cell_matching = True
doc_converter = DocumentConverter(
format_options={
InputFormat.PDF: PdfFormatOption(pipeline_options=pipeline_options)
}
)
start_time = time.time()
conv_result = doc_converter.convert(input_doc_path)
end_time = time.time() - start_time
_log.info(f"Document converted in {end_time:.2f} seconds.")
## Export results
output_dir = Path("scratch")
output_dir.mkdir(parents=True, exist_ok=True)
doc_filename = conv_result.input.file.stem
# Export Text format:
with (output_dir / f"{doc_filename}.txt").open("w", encoding="utf-8") as fp:
fp.write(conv_result.document.export_to_text())
...
### Docling version
docling 2.10.0
python 3.10
...
[Test Docling.pdf](https://github.com/user-attachments/files/18119288/Test.Docling.pdf)
Contributor guide
Assessment
This issue has not been assessed yet.