# Screenshot: Capture Images and PDFs with PHP and Laravel

DevFeed: [Screenshot: Capture Images and PDFs with PHP and Laravel](<https://devfeed.tech/articles/screenshot-capture-images-and-pdfs-with-php-and-laravel-95829.md>)

Original publisher: [Read original article](<https://laravel-news.com/screenshot>)

Author: Yannick Lyn Fatt

Published: 2026-10-21T22:07:29Z

Content type: tutorial

Language: en

Sources: [Laravel](<https://devfeed.tech/sources/laravel.md>)

Topics: [screenshot](<https://devfeed.tech/topics/screenshot.md>), [Laravel](<https://devfeed.tech/topics/laravel.md>), [PHP](<https://devfeed.tech/topics/php.md>), [Image](<https://devfeed.tech/topics/image.md>), [Gotenberg](<https://devfeed.tech/topics/gotenberg.md>)

Tags: [capture](<https://devfeed.tech/tags/capture.md>), [chrome](<https://devfeed.tech/tags/chrome.md>), [filesystem](<https://devfeed.tech/tags/filesystem.md>), [html](<https://devfeed.tech/tags/html.md>), [images](<https://devfeed.tech/tags/images.md>), [jpeg](<https://devfeed.tech/tags/jpeg.md>), [laravel](<https://devfeed.tech/tags/laravel.md>), [laravel-packages](<https://devfeed.tech/tags/laravel-packages.md>), [pages](<https://devfeed.tech/tags/pages.md>), [pdf](<https://devfeed.tech/tags/pdf.md>), [pdfs](<https://devfeed.tech/tags/pdfs.md>), [php](<https://devfeed.tech/tags/php.md>), [screenshot](<https://devfeed.tech/tags/screenshot.md>), [web](<https://devfeed.tech/tags/web.md>)

## AI overview

Screenshot is a PHP and Laravel package that uses Chrome by default to capture HTML, Blade views, and web pages as PNG, JPEG, or PDF, then save captures locally or to configured Laravel storage disks. Its API selects content with `html()`, `view()`, or `url()` and controls dimensions, format, element selection, and PDF paper settings. JavaScript is disabled by default; captures wait for the page load event, so later data or chart rendering may be missed. Assets need absolute URLs or a `<base>` element. Image captures default to full-page output within 2048x10000 pixel limits; `viewport()` limits output to the visible area. PDF element capture moves the element into the document body, which can affect selectors relying on wrappers. Use `capture()` to reuse the same bytes for multiple writes; direct `save()` and `store()` calls on a source each start a new capture. Installation requires supported PHP/Laravel versions, Chrome system libraries, and fonts; downloading Chrome requires PHP's ZIP extension. Gotenberg 8.38+ is also supported for remote rendering.

## Source excerpt

Screenshot captures HTML, Blade views, and web pages as PNG, JPEG, or PDF files with Chrome, then saves them locally or to Laravel filesystem disks. The post Screenshot: Capture Images and PDFs with PHP and Laravel appeared first on Laravel News. Join the Laravel Newsletter to get Laravel articles like this directly in your inbox.