Regenerate PDF after Invoice Design Change

Hi,
After changing the Invoice Design, new created invoice use the new design when opening the PDF.
But old invoice don’t update to the new design.
Is there a way to clear cache, regenerate PDF, or something like this ?
Regards
Vincent

If you resave an invoice it will refresh the PDF.

@david is there a way to force the app to clear all PDFs?

Certainly possible to provide this functionality.

We have a “Clear cache” option in the AP, what do you think about also having it clear the PDFs?

Thanks for the tip !
Would be great to have an “apply to all” button or something like this.

This would be great for me if that was possible.
Design change, then clearing all pdf cache.

I would just like to point out that it’s not possible to save an invoice that has been paid because the balance is zero which throws an error:

production.ERROR: Creating default object from empty value {"userId":1,"exception":"[object] (ErrorException(code: 0): Creating default object from empty value at /var/www/laravel/app/Http/ValidationRules/Invoice/InvoiceBalanceSanity.php:63)

The only clean way I’ve found to handle this is to either search for where your invoices are stored and wipe them all out from that directory or the specific one in question. It will be somewhere like:

laravel/public/storage/[...random_string...]/[...random_string...]/[...random_string...]/invoices/10168.pdf but best to just take an invoice number and search your system for that like updatedb && locate 10168.pdf

cd into invoiceninja/public/storage

then run this to show a list of all cached pdf’s

find . -type f -name ‘*.pdf’

then to delete all cached pdf’s

find . -type f -name ‘*.pdf’ -delete