Skip to content

Create advanced PDF convertor #131

Open

Description

@gagb

@gagb Would be great to have this as an example in the README! Thanks.

Agreed. IMO, a PDF based example would be best where it is able to do the text in the normal way, but any images in the PDF are sent to the LLM. I think this is a more compelling example to organizations then just PNG's.

Exactly this. We could use something like PyMuPDF4LLM to extract images and classify them with VLM later, but if this could be done in one step during pdf->md conversion, that would be brilliant!

Originally posted by Václav Černý (@vaclcer) in #12

Either extend the existing one or create a new one. This is a frequent use case.

Activity

  1. added
    enhancement
    open for contribution
    on Dec 18, 2024
  2. LockedThread commented on Dec 18, 2024

    @LockedThread

    @gagb Would be great to have this as an example in the README! Thanks.

    Agreed. IMO, a PDF based example would be best where it is able to do the text in the normal way, but any images in the PDF are sent to the LLM. I think this is a more compelling example to organizations then just PNG's.

    Exactly this. We could use something like PyMuPDF4LLM to extract images and classify them with VLM later, but if this could be done in one step during pdf->md conversion, that would be brilliant!

    Originally posted by Václav Černý (@vaclcer) in #12

    Either extend the existing one or create a new one. This is a frequent use case.

    I have an open source project that I implemented PDF vector drawing reconstruction for the purpose of ML-based analysis. I would be willing to contribute it.

    It uses a DFS to combine nearby vector drawing bounding boxes to create the maximally connected bbox. This bounding box can then be used to create a pymupdf pixmap and extract what is essentially a screenshot of the vector art.

    Tables in PDFs are usually a collection of distinct vector drawing lines and rectangles, not actual images.

    See: https://github.com/FEPrep/parser/blob/main/parser/drawing/drawing.py

  3. HawkClaws commented on Dec 20, 2024

    @HawkClaws

    I think PyMuPDF4LLM is a good option, but I believe there might be licensing issues.
    Currently, markitdown is under the MIT license, so I think it’s better to avoid integrating libraries with more restrictive licenses than MIT.

    Similarly, libraries that require high machine specifications might also face limitations, as there could be situations where they cannot be used effectively.
    I think that extracting information from PDFs, like extracting images or audio, would be better handled using APIs provided by LLMs, such as those from OpenAI.

    For example, as follows:
    Document-Intelligence-with-LLM

    What do you think?

  4. HawkClaws commented on Jan 12, 2025

    @HawkClaws

    We have created a library of Markdownization that we want to structure with good accuracy without using LLM!
    What do you think?
    It is also MIT licensed!

    https://github.com/HawkClaws/pdf2markdown4llm

  5. Mte90 commented on Jun 17, 2025

    @Mte90

    All this solution as I can see use LLM for the whole page but instead to speed up can make sense to use it only for images.
    There could be PDFs with tons of images or nothing and use always a LLM it isn't a good option.

  6. yonghu-moxtra commented on Dec 5, 2025

    @yonghu-moxtra

    Any update on fillable PDF form(#195)? The filled values are still lost after converting.

  7. Spark123967 commented on Dec 13, 2025

    @Spark123967

    Creating a library for Markdownization without relying on large language models (LLMs) is a solid approach, especially if your goal is accuracy, transparency, and reproducibility. Using deterministic rules and pattern-matching techniques allows for precise control over how content is converted to Markdown, which is particularly valuable for technical documentation, data processing, and structured content workflows �.MIT licensing is a great choice, as it encourages broad adoption and collaboration while protecting your work. This approach ensures that others can use, modify, and distribute your library freely, fostering community contributions and improvements �.

    PDF settings are technically secured in terms of data or folder optimization or original status and when it's to be edited appropriate manner of Optimizations by it's operators.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementopen for contribution

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions