You may have the possibility to convert several PDF document.
Warning
As assets files, by default the PDF files are fetch in the assets folder of
your application.
For more information about path resolution go to assets documentation.
Warning
If you provide multiple PDF files you will get ZIP folder containing all the converted PDF.
namespace App\Controller;
use Sensiolabs\GotenbergBundle\GotenbergPdfInterface;
class YourController
{
public function yourControllerMethod(GotenbergPdfInterface $gotenberg): Response
{
return $gotenberg->convert()
->files(
'document.pdf',
'document_2.pdf',
)
->generate()
;
}
}
Tip
For more information go to Gotenberg documentations.
Default: None
Convert the resulting PDF into the given PDF/A format.
namespace App\Controller;
use Sensiolabs\GotenbergBundle\Enum\PdfFormat;use Sensiolabs\GotenbergBundle\GotenbergPdfInterface;
class YourController
{
public function yourControllerMethod(GotenbergPdfInterface $gotenberg): Response
{
return $gotenberg->convert()
->files(
'document.pdf',
'document_2.pdf',
)
->pdfFormat(PdfFormat::Pdf1b)
->generate()
;
}
}
Default: false
Enable PDF for Universal Access for optimal accessibility.
namespace App\Controller;
use Sensiolabs\GotenbergBundle\Enum\PdfFormat;use Sensiolabs\GotenbergBundle\GotenbergPdfInterface;
class YourController
{
public function yourControllerMethod(GotenbergPdfInterface $gotenberg): Response
{
return $gotenberg->convert()
->files(
'document.pdf',
'document_2.pdf',
)
->pdfUniversalAccess() // is same as `->pdfUniversalAccess(true)`
->generate()
;
}
}