If Ghostscript returns “”, the file is structurally damaged.
qpdf is a free command‑line tool that can rebuild the PDF structure ( --linearize ) and often cures corruption. pinni ni dengudu storiespdf fixed
for f in "$SRC"/*.pdf; do base=$(basename "$f" .pdf) qpdf --linearize "$f" "$DST/$base_fixed.pdf" && \ echo "✔︎ $base repaired" done If Ghostscript returns “”, the file is structurally