microsoft / microsoft/markitdown
Tables in pdf files are not converted properly
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 186k
- Forks
- 13.7k
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 49
Description
I converted a pdf-file with lots of table to markdown. I had expected that markitdown would handle tables gracefully. For example, the following table:
Should be converted into markdown like so:
| Register name | Description | Offset Address |
|---------------|---------------------------------|----------------|
| FMC_ACCTRL | Flash access control register | 0x00 |
| FMC_KEY | Flash key register | 0x04 |
| FMC_OPTKEY | Flash option key register | 0x08 |
| FMC_STS | Flash state register | 0x0C |
| FMC_CTRL | Flash control register | 0x10 |
| FMC_OPTCTRL | Flash option control register | 0x14 |
However, what I get from markitdown is this:
Register address mapping
Table 14 FMC Register Address Mapping
Register name
Description
Offset Address
FMC_ACCTRL
Flash access control register
FMC_KEY
Flash key register
FMC_OPTKEY
Flash option key register
FMC_STS
FMC_CTRL
Flash state register
Flash control register
FMC_OPTCTRL
Flash option control register
0x00
0x04
0x08
0x0C
0x10
0x14
The number 3.6 in the title is gone. But what's worse: the entire table is spread out.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the conversion with the attached user_manual.pdf and compare the generated Markdown with the table shown in the issue. Investigate the PDF conversion entry point and determine whether the title and table row structure are preserved; done means the table remains a Markdown table and the missing title number is retained.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100