#!/usr/bin/env bash set -euo pipefail sudo apt update sudo apt install -y qpdf ghostscript poppler-utils tesseract-ocr tesseract-ocr-hin php-zip img2pdf python3-pil zip libreoffice # Restart whichever web/PHP service exists on your VPS. sudo systemctl restart php8.4-fpm 2>/dev/null || true sudo systemctl restart php8.3-fpm 2>/dev/null || true sudo systemctl restart php8.2-fpm 2>/dev/null || true sudo systemctl restart php8.1-fpm 2>/dev/null || true sudo systemctl restart php8.0-fpm 2>/dev/null || true sudo systemctl restart apache2 2>/dev/null || true sudo systemctl reload nginx 2>/dev/null || true echo "PDFio dependencies installed/restarted where available. Reopen /pdfio-system-check.php to verify."