# Generating PDF documents from the store

> An invoice that must carry a particular wording, a picking slip suited to the workshop, a label in the carrier’s format, a quote sent before the order: document generation is one of the most frequent needs and one of the most misjudged, because the difficulty isn’t where people expect.

- Source canonique : [https://allaux.fr/en/modules/generation-de-documents-pdf](https://allaux.fr/en/modules/generation-de-documents-pdf)
- Langue : EN
- Dernière mise à jour : 2026-09-30

## The typical need

Requests fall into three families. Changing an existing document: adding legal wording to the invoice, showing an internal reference, altering how lines are laid out. Creating a document that doesn’t exist: picking slip, workshop sheet, parcel label, certificate. Producing a document outside the order cycle: a quote, a customer summary, a periodic statement.

The first two lean on the store’s own mechanisms, which already produce PDFs and offer editable templates. The third asks more, because you must decide where the document is stored, who can view it and how long it is kept.

## How I approach this kind of work

I start from the templates the platform provides rather than an independent generator. PrestaShop produces its invoices and delivery notes from templates that can be overridden from the theme, which allows a mention to be added or a table reorganised without touching the core or losing the change at update time. That approach has a limit: it follows the original document’s structure, and a full layout redesign sometimes amounts to writing a new document.

The real work sits elsewhere. First in the data: a document reflects the order’s state at issue time, and that state must not change if the product is edited later. Then in the rendering: a missing font, a badly encoded accented character or an oversized image produce a degraded document with no error shown. Finally in imposed formats: a carrier label follows dimensions and content defined by the carrier, not by you.

I always check the printed result and not just the on-screen view, because that is where column overflow and margins cutting a mandatory mention become visible.

## Related pages

- **Invoice display and template problems** — Common symptoms on PrestaShop when the invoice doesn’t come out as expected. ([/prestashop/problemes/factures-affichage-modele](/prestashop/problemes/factures-affichage-modele))
- **Automated PDF quotes** — A delivered project on producing documents outside the order cycle. ([/realisations/devis-pdf-automatise](/realisations/devis-pdf-automatise))
- **Adding a product or order field** — When the wording to show on the document doesn’t exist in the store yet. ([/modules/ajouter-un-champ-produit-ou-commande](/modules/ajouter-un-champ-produit-ou-commande))

## FAQ

### Can the invoice be changed without risking a compliance problem?

Layout can be changed freely, but mandatory wording and numbering aren’t improvised: numbering must stay continuous with no gaps. I never touch the numbering sequence, only presentation and added wording.

### Do already issued documents change if I edit the template?

It depends how the store works: some documents are regenerated on demand from current data, others are kept as issued. That distinction matters and is worth checking before any template change.

### Why do my accented characters render badly in the PDF?

Almost always because the font used by the generator doesn’t contain those characters, or isn’t embedded in the document. It is a font problem, not a content one, and it is fixed at template level.

### Can the document be emailed automatically?

Yes, and that is often what the request is really about. The attachment is added to emails triggered by a status change, which means deciding which status triggers which document.
