Skip to content

[Bug] Add dependency health check for poppler-utils #349

Open
BhakktiGautam wants to merge 2 commits into
Durgeshwar-AI:mainfrom
BhakktiGautam:feature/poppler-health-check
Open

[Bug] Add dependency health check for poppler-utils #349
BhakktiGautam wants to merge 2 commits into
Durgeshwar-AI:mainfrom
BhakktiGautam:feature/poppler-health-check

Conversation

@BhakktiGautam

Copy link
Copy Markdown

📌 Closes Issue

Closes #329

🐛 Problem

When poppler-utils is missing on the host system, users see a cryptic 500 error after uploading a PDF. This provides no actionable feedback.

✅ Solution

Add a health check endpoint that validates system dependencies before users attempt conversions.

🚀 What's New?

Backend

  • GET /health/dependencies - Returns status of all system dependencies
  • GET /health - Simple health check

Frontend

  • DependencyWarning component - Shows non-intrusive warning banner
  • Auto-checks dependencies on page load
  • Users see warnings before uploading files

📁 Files Added/Modified

New Files

File Purpose
backend/utils/dependency_checker.py Check poppler, tesseract, ghostscript
backend/blueprints/health.py Health check endpoints
frontend/src/components/DependencyWarning.jsx Warning banner UI

Modified Files

File Change
backend/main.py Register health blueprint
frontend/src/App.jsx Add DependencyWarning component

🔧 API Response Example

{
  "status": "degraded",
  "dependencies": {
    "poppler-utils": {
      "installed": false,
      "required_for": ["PDF to PNG", "PDF to DOCX"],
      "install_command": "apt-get install poppler-utils",
      "brew_command": "brew install poppler",
      "windows_command": "conda install -c conda-forge poppler"
    },
    "tesseract-ocr": {
      "installed": true,
      "required_for": ["Image OCR"],
      "install_command": "apt-get install tesseract-ocr"
    },
    "ghostscript": {
      "installed": false,
      "required_for": ["PDF compression"],
      "optional": true,
      "install_command": "apt-get install ghostscript"
    }
  },
  "critical_missing": ["poppler-utils"]
}

Rule Compliance
No data storage

No external APIs

Pure file manipulation

🧪 How to Test
Backend
bash
curl http://localhost:5000/health/dependencies
Frontend
Start the app

See warning banner if poppler missing

Click close button to dismiss

##Checklist
/health/dependencies returns accurate status

Warning banner shows before upload

Works on Windows/Linux/Mac (commands for all OS)

Close button to dismiss banner

@vercel

vercel Bot commented Jun 15, 2026

Copy link
Copy Markdown

@BhakktiGautam is attempting to deploy a commit to the Durgeshwar's projects Team on Vercel.

A member of the Team first needs to authorize it.

@BhakktiGautam

Copy link
Copy Markdown
Author

@Durgeshwar-AI

Following up on PR #337 (PDF Images Extractor).

Please review and add GSSoC label when possible.

Thanks! 🙏

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] PDF processing fails silently when poppler-utils is missing

1 participant