Utilize the pageRanges option to specify which pages to include in the PDF output. See PDF options for more options.

Example

This example generates a PDF from the Wikipedia page about PDF, extracting pages 1, 2, and 18 through 19.

Output