Bug? - Web view PDF download does not honor PDF templates

Not sure whether this is a bug or has just never been included previously as I’ve never used the Web/Guest View before.

Running the latest release (1.5.9).

To give you an indication of my setup - I have separate invoice PDF templates; Default, Paid & Overdue set in the settings.

When viewing an overdue or paid invoice via the guest link the watermarks display correctly in the web view indicating whether it is PAID / OVERDUE etc.

However clicking the ‘Download PDF’ button simply generates a PDF with the ‘Default’ PDF template and does not honor the ‘PAID’ or ‘OVERDUE’ status and it’s corresponding PDF template.

Surely it should honor the PDF templates depending on the status of the invoice? :wink:

Can’t test this at the moment, but added a ticket for it: https://development.invoiceplane.com/browse/IP-698

1 Like

@nmay1990 this same problem I have at present, ¿solved it?

I have created a pull request on Github for select the appropriate pdf template for guest users.

Simply change the file application/modules/guest/controllers/View.php
at the line 114 inside the function

public function generate_invoice_pdf($invoice_url_key, $stream = true, $invoice_template = null)


$invoice_template = get_setting('pdf_invoice_template');

and add

$invoice_template = select_pdf_invoice_template($invoice);