project
pdf-craft - Open source PDF to Markdown tool
pdf-craft is a tool for converting PDF files to other formats (such as Markdown and EPUB), focusing on processing scanned book PDF files. pdf-craft supports extracting the main text, filtering out headers, footers, etc.
What is pdf-craft?
pdf-craft is a tool for converting PDF files to other formats (such as Markdown and EPUB), focusing on processing scanned book PDF files. pdf-craft supports extracting the main text content and filtering out non-text elements such as headers, footers, and footnotes. Based on a combination of the DocLayout-YOLO algorithm and PaddleOCR text recognition technology, pdf-craft can effectively handle page breaks and generate semantically fluent text.
The main features of pdf-craft
- PDF to Markdown functionConvert PDF to Markdown format, extract the main text while preserving the structure, and embed illustrations, tables, and formulas as screenshots to ensure the semantic coherence of the generated Markdown file.
- PDF to EPUB conversion functionThe system uses a large language model to build the book structure of EPUB, generates a table of contents, integrates annotations and citations, corrects OCR errors, and converts it into EPUB format adapted for e-book readers.
The technical principles of pdf-craft
- Page Layout AnalysisThis tool uses the DocLayout-YOLO algorithm to analyze the layout of PDF pages, identifying the position and boundaries of elements such as text blocks, images, and tables. A custom algorithm is then used to further optimize the layout parsing, ensuring the accuracy and completeness of the extracted text content.
- Text recognitionText recognition based on PaddleOCR. PaddleOCR is a high-performance open-source OCR tool that can accurately recognize text content in scanned books. It uses a pre-trained model to recognize and extract text blocks from the page.
- Page crossingWhen processing cross-page text, the algorithm determines the logical relationship between text blocks to ensure the continuity of the cross-page text.
- Reading order optimizationThe reading order of text blocks is determined based on layoutreader. An order conforming to human reading habits is generated according to the page layout and the position of the text blocks.
pdf-craft project address
- GitHub repository:https://github.com/oomol-lab/pdf-craft
Application scenarios of pdf-craft
- academic researchConvert scanned academic papers into Markdown or EPUB format for easy editing, annotation, and organization.
- eBook CreationConvert scanned books to EPUB format, generate a table of contents and chapter structure for easy publishing and reading.
- Document ArchiveConvert paper documents or PDF files to Markdown or EPUB format for easy long-term archiving and retrieval.
- Educational materials organizationConvert scanned textbooks or lecture notes into an editable format for easier organization by teachers and learning by students.
- Personal learningConvert scanned books or materials into Markdown format for easy personal note-taking and review.