Take screenshot of any PDF page

Author: uh-zuhCreated Jun 10, 2026Updated Sep 17, 2026
Labelsstale

Problem I need to provide PDF files on my site and additionally I want to show preview of these PDF files using simple images becuase of embedding PDF into page is not so easy, convenient and functional as embedding images.

Solution I need to do following:

  • Take screenshot of any separate page specified (most important)
  • Take one vertically long screenshot with all pages taking into account page breaks (now /chromium/screenshot with options.emulateMediaType:"print" and options.fullPage:true doesn't take into account page breaks)

I think it is good to add new option to /chromium/screenshot to behave like PDF and additionally add options.pageRanges option which will work same as in /chromium/pdf.

Alternatives Generate PDF using /chromium/pdf and use another tools to convert PDF to separate images.