Weave Code
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

MarkdownScreenshotBuilder

Convert Markdown files into a screenshot. The Markdown is first converted to HTML, then captured as an image via Chrome.

Basic usage

namespace App\Controller;

use Daif\ChromePdfBundle\ChromeScreenshotInterface;

class YourController
{
    public function yourControllerMethod(ChromeScreenshotInterface $chromeScreenshot): Response
    {
        return $chromeScreenshot->markdown()
            ->wrapper('wrapper.html.twig')
            ->files('content.md')
            ->generate()
            ->stream()
        ;
    }
}

Available methods

All methods from HtmlScreenshotBuilder are available, plus:

Method Description
files(Stringable|string ...$paths) Markdown files to convert
wrapper(string $template, array $context) Twig wrapper template
wrapperFile(string $path) HTML wrapper file

Examples

Markdown screenshot with custom dimensions

$chromeScreenshot->markdown()
    ->wrapper('styled_wrapper.html.twig')
    ->files('content.md')
    ->width(1200)
    ->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.
emuniq/filament-browser-notifications
syriable/filament-translator
hungnm28/livewire-form
wenprise/eloquent
crudly/encrypted
fadion/bouncy
cuci/prototurk-sdk
gos/pubsub-router-bundle
cuci/prototurk-sdk-symfony
clementtalleu/easyadmin-markdown-bundle
codeflextech/permission-manager
karnoweb/livewire-datepicker
sayedenam/sayed-dashboard
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui