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

Html2Pdf Bundle Laravel Package

94noni/html2pdf-bundle

View on GitHub
Deep Wiki
Context7

[!NOTE] Package abandoned.


NoniHtml2pdfBundle

Fork of the original

Difference with latest v0.x is the support of Symfony v6+ and PHP v8+, tagged here as v1.

Used for personal projects to render some PDF.

History

Html2pdf for Symfony applications.

Please read https://github.com/FrDeamon/EnseparHtml2pdfBundle/pull/37


How to install?

Use Composer to install it:

$ composer require 94noni/html2pdf-bundle

Enable it in your config/bundles.php file:

Noni\Html2pdfBundle\NoniHtml2pdfBundle::class => ['all' => true],

How to use?

In your code:

use Noni\Html2pdfBundle\Factory\Html2pdfFactory;

class MyClass
{
    private Html2pdfFactory $html2pdfFactory;

    public function __construct(Html2pdfFactory $html2pdfFactory)
    {
        $this->html2pdfFactory = $html2pdfFactory;
    }
}

You can pass every options you would pass to Html2pdf, for instance:

$html2pdfFactory = $this->html2pdfFactory->create('P', 'A4', 'en', true, 'UTF-8', [10, 15, 10, 15]);

If the previous arguments are not provided, the factory uses its own default values. You can configure those default values by adding the bundle configuration to your config file:

noni_html2pdf:
    orientation: 'P'
    format: 'A4'
    lang: 'en'
    unicode: true
    encoding: 'UTF-8'
    margin: [10, 15, 10, 15]

Read more on the library Html2pdf here.

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.
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle