A specific page or range of pages can be specified using the bracket syntax with zero-based indexing. For instance,
 will refer to the ninth page, and
[0-6] to the first seven pages. Using this, a duplicate of the PDF with the 8th page replaced can be achieved as follows:
convert my-file.pdf[0-6] page-8.png my-file.pdf output-file.pdf
CLICK HERE to find out more related problems solutions.