Can not create custom PDF in version 1.5.2

Hi,
I was using my own templates for quotes and invoices with 1.4.10 which worked quite nice.
I understand that under the hood mpdf was updated from 6.1.0 to 7.x.

Now I fail to generate PDF quotes and invoices. If I use the default template, everything works fine.

I am usung Ubuntu 16.04, php7.0.15 and Apache.

I get the errors posted below.

Is there any recommendation to get more debug output?

Thanks a lot
Cornelius


A PHP Error was encountered

Severity: Notice

Message: Undefined offset: 3

Filename: src/Tag.php

Line Number: 1806

Backtrace:

File: /var/www/iplane152/vendor/mpdf/mpdf/src/Tag.php
Line: 1806
Function: _error_handler

File: /var/www/iplane152/vendor/mpdf/mpdf/src/Mpdf.php
Line: 14967
Function: OpenTag

File: /var/www/iplane152/vendor/mpdf/mpdf/src/Mpdf.php
Line: 9350
Function: WriteHTML

File: /var/www/iplane152/vendor/mpdf/mpdf/src/Mpdf.php
Line: 11032
Function: _puthtmlheaders

File: /var/www/iplane152/vendor/mpdf/mpdf/src/Mpdf.php
Line: 1912
Function: _enddoc

File: /var/www/iplane152/vendor/mpdf/mpdf/src/Mpdf.php
Line: 9050
Function: Close

File: /var/www/iplane152/application/helpers/mpdf_helper.php
Line: 106
Function: Output

File: /var/www/iplane152/application/helpers/pdf_helper.php
Line: 254
Function: pdf_create

File: /var/www/iplane152/application/modules/quotes/controllers/Quotes.php
Line: 207
Function: generate_quote_pdf

File: /var/www/iplane152/index.php
Line: 327
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /var/www/iplane152/vendor/codeigniter/framework/system/core/Exceptions.php:271)

Filename: core/Common.php

Line Number: 570

Backtrace:

An uncaught Exception was encountered

Type: Mpdf\MpdfException

Message: Data has already been sent to output, unable to output PDF file

Filename: /var/www/iplane152/vendor/mpdf/mpdf/src/Mpdf.php

Line Number: 9115

Backtrace:

File: /var/www/iplane152/application/helpers/mpdf_helper.php
Line: 106
Function: Output

File: /var/www/iplane152/application/helpers/pdf_helper.php
Line: 254
Function: pdf_create

File: /var/www/iplane152/application/modules/quotes/controllers/Quotes.php
Line: 207
Function: generate_quote_pdf

File: /var/www/iplane152/index.php
Line: 327
Function: require_once

Line 1806 in Tag.php is the table parser. So I commented out all tables.

Message: Undefined property:
stdClass::$quote_custom_bedarfsanfor
derer

I realize, that the parser does not know the custom fields anymore. How are these used in the template, now?

This topic explains the change naming of the custom_fields:

https://community2.invoiceplane.com/t/topic/4165

I boiled it down, that it seems to be a problem with the item-tableā€¦ :frowning:
Especially the footer where the voodoo with sun and the colspan occurs.

Oh bummer!

$show_discounts was renamed to $show_item_discounts. This is what caused the trouble.
After renaming it to $show_item_discounts in my template, everything works fine!

READ THIS:
https://wiki.invoiceplane.com/en/1.5/templates/customize-templates