sensiolabs / GotenbergBundle

A Symfony Bundle for interacting with Gotenberg. Integrates natively with twig, router, PHPStorm and more !
MIT License
21 stars 7 forks source link

Add convert route #64

Closed StevenRenaux closed 2 months ago

StevenRenaux commented 3 months ago

Closes #63

    #[Route('/convert', name: 'pdf_convert')]
    public function convert(GotenbergPdfInterface $gotenberg): Response
    {
        return $gotenberg->convert()
            ->pdfUniversalAccess()
            ->files('document.pdf')
            ->generate()
            ;
    }

AbstractFormatPdfBuilder could be used everywhere (let me know if we can change in that way) and for #44 and #43