I try to split the pages of one PDF file into a separated one-page PDF files. This command does the job so far:
gs \
-q \
-dQUIET \
-dSAFER \
-dBATCH \
-dNOPAUSE \
-dNOPROMPT \
-dAutoRotatePages=/None \
-sDEVICE=pdfwrite \
-sOutputFile=test0%d.pdf \
-fpdf-sample.pdf
This works, but every time there is one more PDF file generated which is just blank.
Is there a way to avoid this?
used Ghostscript version: 9.05