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.

import Doczilla from '@doczilla/node'

const doczilla = new Doczilla('<your token>')

const pdf = await doczilla.pdf.direct({
  page: {
    url: 'https://en.wikipedia.org/wiki/PDF'
  },
  pdf: {
    pageRanges: '1,2,18-19'
  }
})

Output