Skip to main content
Each screenshot class is instantiated with new and exposes capture(options)Promise<Buffer> (image bytes).

UrlScreenshot

HtmlScreenshot

MarkdownScreenshot

Screenshot options

  • propertiesImageProperties: format ("png" | "jpeg" | "webp"), quality (0–100, JPEG), omitBackground, width, height, clip, deviceScaleFactor
  • userAgent — override the User-Agent header sent by Chromium
  • waitDelay, waitForSelector, waitForExpression
  • extraHttpHeaders, failOnHttpStatusCodes, failOnConsoleExceptions, failOnResourceHttpStatusCodes, ignoreResourceHttpStatusDomains, failOnResourceLoadingFailed, skipNetworkIdleEvent, skipNetworkAlmostIdleEvent
  • optimizeForSpeed — favor encoding speed over output size
  • cookies, downloadFrom, webhook, outputFilename, trace
Screenshots produce an image rather than a PDF, so PDF-only options — header/footer, generateDocumentOutline, userPassword/ownerPassword, embeds/embedsMetadata, facturx, permissions, split, flatten — don’t apply here, unlike Chromium converters.
See Types for ImageProperties and related types.