Dmytro Krasun

What is a screenshot or HTML rendering API?

A screenshot API or a screenshot as a service is usually a cloud or a remote server service that provides the ability to render any website, HTML, Markdown, or even PDF by making a request to the service, be it over HTTP, TCP, or any other protocol.

Posted November 22, 2022 by Dmytro Krasun ‐ 2 min read

Heart-touching feedback from Gregory

Daily and nightly, I work on improving the quality and performance of ScreenshotOne (your friendly screenshot API) and ensuring I help customers solve their problems and prosper.

Posted November 21, 2022 by Dmytro Krasun ‐ 2 min read

Building a website directory with Next.js, Tailwind CSS, and Prisma

I am seeking a good stack I can switch to for my new projects. So, I decided to try and evaluate Next.js, Tailwind CSS, and Prisma stack with a small project.

Posted November 17, 2022 by Dmytro Krasun ‐ 15 min read

I migrated to Google Cloud

Google Cloud gives $300 in credits for 3 months for experimenting. And I decided to give it a try, but not because of the free credits.

Posted September 14, 2022 (updated September 14, 2022) by Dmytro Krasun ‐ 4 min read

How to hide chat widgets when taking a screenshot with Puppeteer

When you want to take chat widgets, there are annoying chat widgets that you would love to hide. It is easy to do.

Posted July 28, 2022 by Dmytro Krasun ‐ 1 min read

How to hide cookie banners when taking a screenshot with Puppeteer

When taking a screenshot, you want to ensure that you take a clean screenshot without cookie banners or cookie consent forms. And in this article, I will share with you how you can do it when using Puppeteer.

Posted July 28, 2022 by Dmytro Krasun ‐ 11 min read

Puppeteer: "Execution context was destroyed, most likely because of a navigation"

In this article, I share how to fix the "execution context was destroyed, most likely because of a navigation" error that might happen while using Puppeteer.

Posted July 25, 2022 by Dmytro Krasun ‐ 2 min read

A complete guide on how to take full page screenshots with Puppeteer, Playwright or Selenium

To take full-page screenshots with Puppeteer or Playwright, you only need to set the fullPage parameter to `true` when taking a screenshot. But there are so many caveats that you may assume by default that the full-page screenshot feature does not work in Puppeteer.

Posted July 20, 2022 (updated October 19, 2022) by Dmytro Krasun ‐ 7 min read

How to create a site thumbnail with Puppeteer

We can consider the screenshot of URL or HTML as a thumbnail, but I write about the thumbnail of a screenshot. How do you take a screenshot within the defined viewport but with different image width and height? Resize!

Posted July 18, 2022 by Dmytro Krasun ‐ 3 min read

Taking screenshots with Puppeteer in GIF, JP2, TIFF, AVIF, HEIF, or SVG format

Puppeteer, by default, supports only four formats for taking screenshots or rendering HTML: PNG, JPEG, WebP, and PDF.

If you want to take a screenshot of the site or render HTML in a different format, like GIF, JP2, TIFF, AVIF, HEIF, or SVG, there are many workarounds on how to do it.

Posted July 17, 2022 by Dmytro Krasun ‐ 6 min read

Puppeteer, wait until the page is ready!

Join me in exploring how to find the ideal wait time or event of when to take the page screenshot with Puppeteer.

Posted July 13, 2022 (updated July 14, 2022) by Dmytro Krasun ‐ 7 min read

Uploading website screenshots to any S3-compatible storage

In this note, I share how I take website screenshots or render HTML and upload the resulted images or PDF to any S3-compatible storage like Amazon S3, Cloudflare R2, or Backblaze B2.

Posted July 12, 2022 by Dmytro Krasun ‐ 3 min read

How to render HTML with Puppeteer

Suppose you want a reliable way to render HTML with the latest versions of browsers.In that case, I bet you can't find a better solution than rendering HTML with Puppeteer — you always have an up-to-date version of the browser, and using Puppeteer is super easy.

Posted June 26, 2022 (updated June 27, 2022) by Dmytro Krasun ‐ 4 min read

How to add custom scripts to a page in Puppeteer

Let's discover how it works quickly.

Posted June 24, 2022 by Dmytro Krasun ‐ 2 min read

How to add custom styles to a page in Puppeteer

Let's discover how it works quickly.

Posted June 24, 2022 (updated June 24, 2022) by Dmytro Krasun ‐ 2 min read

How to take website screenshots with PHP

Today, there are many options to make screenshots of any URL with PHP. Let's examine them all and choose which suits you best.

Posted June 14, 2022 by Dmytro Krasun ‐ 3 min read

How to take website screenshots with JavaScript or TypeScript (Node.js)

Today, there are many options to make screenshots of any URL with JavaScript or TypeScript (Node.js). Let's examine them all and choose which suits you best.

Posted June 6, 2022 (updated June 14, 2022) by Dmytro Krasun ‐ 4 min read

How to take website screenshots with Java

Today, there are many options to make screenshots of any URL with Java. Let's examine them all and choose which suits you best.

Posted June 2, 2022 (updated June 10, 2022) by Dmytro Krasun ‐ 3 min read

How to take website screenshots with Go

Today, there are many options to make screenshots of any URL with Go. Let's examine them all and choose which suits you best.

Posted June 1, 2022 (updated June 10, 2022) by Dmytro Krasun ‐ 5 min read

How to set a time zone in Puppeteer for page

Puppeteer allows blocking any outgoing requests while loading the page. Whether you want to block ads, tracking scripts, or different types of resources, it is relatively easy to do with Puppeteer.

Posted March 11, 2022 (updated June 23, 2022) by Dmytro Krasun ‐ 1 min read

How to block requests with Puppeteer

Puppeteer allows blocking any outgoing requests while loading the page. Whether you want to block ads, tracking scripts, or different types of resources, it is relatively easy to do with Puppeteer.

Posted March 9, 2022 (updated July 14, 2022) by Dmytro Krasun ‐ 4 min read

How to take a screenshot of the element with Puppeteer

Puppeteer allows you to automate everything you can do in the browser manually and even more. You can take screenshots of the entire page and the specific elements.

Posted February 1, 2022 (updated June 18, 2022) by Dmytro Krasun ‐ 1 min read

How to use proxy per page with Puppeteer

It is easy to use proxy globally for the puppeteer instance, but there is a trick to use proxy on a per-page basis.

Posted January 20, 2022 (updated July 10, 2022) by Dmytro Krasun ‐ 3 min read

How to take a screenshot with Puppeteer

Making screenshots of the websites with Puppeteer can be tricky. A lot of pitfalls wait for us. Let's examine Puppeteer on a set of "screenshotting" problems and tackle arising pitfalls.

Posted January 5, 2022 (updated July 28, 2022) by Dmytro Krasun ‐ 13 min read