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.
boundwize/jsonrecast
nexmo/api-specification
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata