firecrawl / firecrawl/pdf-inspector
Markdown is always None
- Dominant language
- Rust
- Stars
- 19.1k
- Forks
- 1.3k
- Avg merge
- 9h 21m
- Merged PRs (30d)
- 51
Description
Hello,
To install pdf-inspector, I passed through the following steps:
- installed Rust & Cargo, `curl https://sh.rustup.rs -sSf | sh`;
- cloned `pdf-inspector` into a new directory;
- ran `pip install maturin`, then `maturin develop --release`, according to your instructions.
I received the message in the terminal that `pdf_inspector` was successfully built.
Then I implemented the code snippet according to your `docs/python.md`:
```
import pdf_inspector
import os
input_dir = '/home/molokanov/Downloads/my_collection/pdf'
output_dir = '/home/molokanov/pdf-inspector/output'
for file in os.listdir(input_dir):
result = pdf_inspector.process_pdf(os.path.join(input_dir, file))
print(result.pdf_type)
print(result.confidence)
print(result.page_count)
outFile = file[0:len(file)-4]+'.md'
with open(os.path.join(output_dir, outFile), 'w') as g:
g.write(str(result.markdown))
```
The content of each `.md` file is `None`.
Moreover, `result.confidence` is always `0.949999988079071`, for any input pdf file, and `result.page_count` is always `1`.
Input pdf file examples are in the attachment.
Any workaround?
[jiaocaineedrop_jiaocai_needrop_en_1564.pdf](https://github.com/user-attachments/files/30743339/jiaocaineedrop_jiaocai_needrop_en_1564.pdf)
[yanbaopptmerge_yanbaoPPT_5560.pdf](https://github.com/user-attachments/files/30743345/yanbaopptmerge_yanbaoPPT_5560.pdf)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the report with the two attached PDFs and the example in docs/python.md, then trace the process_pdf Python binding and the returned markdown, confidence, and page_count fields. Done means the sample PDFs produce non-None markdown and accurate metadata, with regression coverage for the reported behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, rust
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100