Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Chrome Pdf Bundle Laravel Package

daif/chrome-pdf-bundle

View on GitHub
Deep Wiki
Context7

UrlScreenshotBuilder

Generate a screenshot from a URL.

Basic usage

namespace App\Controller;

use Daif\ChromePdfBundle\ChromeScreenshotInterface;

class YourController
{
    public function yourControllerMethod(ChromeScreenshotInterface $chromeScreenshot): Response
    {
        return $chromeScreenshot->url()
            ->url('https://example.com')
            ->generate()
            ->stream()
        ;
    }
}

From a Symfony route

$chromeScreenshot->url()
    ->route('dashboard', ['user' => 42])
    ->generate()
    ->stream()
;

Available methods

All methods from HtmlScreenshotBuilder are available, plus:

Method Description
url(string $url) URL of the page to capture
route(string $name, array $parameters) Symfony route to capture

Examples

Screenshot of an external page

$chromeScreenshot->url()
    ->url('https://example.com')
    ->width(1280)
    ->height(800)
    ->format('png')
    ->generate()
    ->stream()
;
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
xiloryx/log-collector
a21ns1g4ts/filament-stripe
la-php/laravel-admin
artisan-build/community-prompts
vleroy/smart
ayles-software/laravel-australian-public-holidays
cboxdk/laravel-id-spatie
cboxdk/laravel-id-billing
cboxdk/laravel-id-billing-bridge
simple-as-fuck/php-performance-log
hsluv/hsluv
seampact/codegen
seampact/hooks
seampact/ir
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table
siberfx/flysystem-wasabi
hollyit/token-replace
ippanelcom/laravel-sdk