Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

94noni/NoniHtml2pdfBundle

Open more actions menu

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 FrDeamon/EnseparHtml2pdfBundle#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.

About

Html2pdf for Symfony

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.