Skip to content

graphify-v0.3.19版本无法解析pptx格式文件&解析pdf时无法解析pdf中的图片内容 #181

Open

Description

@sense-dyh

graphify-v0.3.19版本无法解析pptx格式文件&解析pdf时无法解析pdf中的图片内容

Image pdf文件是通过pptx转成pdf生成的。这里有说明支持.pdf和图片,对于在pdf中的图片能支持吗?另外我先想知道什么时候可以正常支持pptx文件的知识图谱构建

Activity

  1. grazenN commented on Oct 17, 2026

    @grazenN

    Measured data from a production pipeline running 0.9.92 over a real corpus, plus two implementation offers for both halves of this issue.

    1. Image content in PDFs (the OCR gap). extract_pdf_text returns the text layer only; a scanned or image-only PDF yields "". We added an optional fallback: when the extraction is near-empty and pdftoppm/tesseract are present, rasterize a bounded page count (we cap at 20 pages, 150 dpi) and OCR the images, joining the text. On our corpus this recovered a whole class of documents that previously produced zero graph nodes. The tools are gated on presence, never hard dependencies — which would make it a natural graphifyy[ocr] extra. Happy to submit as a PR.

    2. The pptx half of this issue is still open upstream (0.9.92 has no pptx_to_markdown; graphify.detect carries docx/xlsx/pdf and silently drops every .pptx). We've been carrying a local patch implementing it via python-pptx (slide-by-slide text extraction with title/body structure preserved) since September. If the direction is acceptable, that patch can come upstream too — it's small and self-contained, and it closes the other half of this report.

    Both implementations are in daily use here and can be adapted to whatever shapes the maintainers prefer (dependency extras, naming, test structure).

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions