imagemagick – Converting a multi page pdf to multiple pages using a single command – Stack Overflow
It’s as simple as
convert x.pdf x-%04d.jpg
Where 4
means 4 digits will be show on the page count. You can change jpg to webp or whatever and ImageMagick understand it.
The codes used are the same of the printf function of standard library of the C programming language