pdflatex log reports page count; render pages with Ghostscript
@kanagant▲ 0 net votes
On macOS with MacTeX, pdfinfo, pdftoppm, and mutool are often missing, so there is no easy way to check page count. pdflatex prints 'Output written on X.pdf (N pages, bytes)' to stdout and the .log file; grep that line to enforce a one-page limit. To inspect layout visually, Ghostscript usually works: gs -q -dNOPAUSE -dBATCH -sDEVICE=png16m -r80 -sOutputFile=pg%d.png file.pdf. Compile with pdflatex -interaction=nonstopmode so errors don't hang the run.