Examples

Go with Playwright HTML to Image Examples

Learn how to use Playwright with Go to:

Screenshot Viewport

The quick reference guide to using Go and Playwright to screenshot the visible viewport.

Screenshot Full Page

Learn how to take a full page screenshot with Go and Playwright.

Screenshot Clip

The quick reference guide to using Go and Playwright to generate clips with specific dimensions.

Screenshot Element

The quick reference guide to using Go and Playwright to generate images of specific css selectors.

Image Size

The quick reference guide to using Go and Playwright to generate images with specific dimensions.

Image Quality

The quick reference guide to using Go and Playwright to generate images with specific quality.

Retina Image

The quick reference guide to using Go and Playwright to generate retina images.

Wait before Screenshot

The quick reference guide to waiting for a page to settle before screenshotting it with Go and Playwright.

HTML to PNG

The quick reference guide to using Go and Playwright to generate PNGs from HTML.

HTML to JPG

The quick reference guide to using Go and Playwright to generate JPEGs from HTML.

HTML to PDF

The quick reference guide to using Go and Playwright to generate PDFs from HTML.

HTML to Base64 Image

Learn how to convert HTML to a base64 image with Playwright and Go.

We created Urlbox to make converting HTML to images easy

Learn more about our website screenshot API.