My task is to bulk convert searchable PDFs into image-only PDFs. I have found out that I can do it with Ghostscript using fist pdf2ps (to convert PDF to PS) and then ps2pdf (to convert PS to PDF).
I installed gs920w32.exe on Windows 10.
pdf2ps works perfectly for me:
pdf2ps "directory\input.pdf" "directory\output.ps"
But ps2pdf simply does nothing:
ps2pdf "directory\output.ps" "directory\output.pdf"
I also noticed that if I execute pdf2ps without parameters, I get
"Usage: pdf2ps [-dASCII85DecodePages=false] [-dLanguageLevel=n] input.pdf output.ps"
But if I execute ps2pfd without paramenets I also get nothing.
What do I do wrong?
UPD: "Image-only" PDF looks the same as "searchable" PDF but you cannot search in it, thus you can also call it just "non-searchable" PDF.
SOLUTION: I solved my problem by executing this:
gswin64c -o "directory\input.pdf" -dNoOutputFonts -sDEVICE=pdfwrite "directory\output.pdf"