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

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.
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table
siberfx/flysystem-wasabi
hollyit/token-replace
ippanelcom/laravel-sdk
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel