Код: Выделить всё
$doc = $gotenbergPdf
->html()
->content('rechnungen/pdf/rechnung.pdf.html.twig', [])
->paperStandardSize(PaperSize::A4)
->generate()
->stream();
< /code>
После этого я хочу отправить его по электронной почте: < /p>
$email = (new Email())
->from('from@mail.de')
->to('to@mail.de')
->subject('subject')
->text('text')
->addPart(new DataPart(new FileFile(stream_get_contents($dokument)),'Contract.pdf','application/pdf'));
$this->mailer->send($email);
Код: Выделить всё
stream_get_contents(): Argument #1 ($stream) must be of type resource, Symfony\Component\HttpFoundation\StreamedResponse given
Подробнее здесь: https://stackoverflow.com/questions/793 ... fony-email