---
title: "Feature: #763 - Event to generate documents in the backend"
manual: "Cart"
version: "main"
permalink: "https://docs.typo3.org/permalink/extcode/cart:feature-763-event-to-generate-documents-in-the-backend@main"
source: "Changelog/12.0/Feature-763-GenerateDocumentEvent.rst"
rendered: "2026-11-20T20:29:02+00:00"
---

# Feature: #763 - Event to generate documents in the backend {#feature-763-event-to-generate-documents-in-the-backend}

See [Pull request 763](https://github.com/extcode/cart/pull/763) and
[Issue 743](https://github.com/extcode/cart/issues/743)

## Description {#description}

The `DocumentController` of the backend module no longer creates the PDF
documents with the `PdfService` of cart_pdf. It dispatches the new event
`\Extcode\Cart\Event\Document\GenerateDocumentEvent` with the order item and
the document type (e.g. `invoice`, `delivery`) instead. The event is
stoppable, a listener can stop the propagation with
`setPropagationStopped(true)`.

## Impact {#impact}

Any extension can generate the documents of an order by registering an event
listener for `GenerateDocumentEvent`. cart_pdf provides such a listener, it
needs a version that supports this event.
