Invoice PDF prints off Black Page?

  • Posts: 575
  • Thank you received: 11
  • Hikashop Business
2 years 11 months ago #351932

-- HikaShop version -- : 4.7.2
-- Joomla version -- : 4.3.1
-- PHP version -- : 8
-- Browser(s) name and version -- : Firefox

Hi, Since updating to J4 and installing the new invoice PDF, when selecting multiple orders to print, it now prints a blank page between each order (see screen dumps) it did not previously do this?

Rgds



Attachments:
Last edit: 2 years 11 months ago by mohairbears.
The following user(s) said Thank You: leitzdesign

Please Log in or Create an account to join the conversation.

  • Posts: 85609
  • Thank you received: 14014
  • MODERATOR
2 years 11 months ago #351942

Hi,

In the file plugins/hikashop/attachinvoice/attachinvoice.php there is the line:

$content = implode('<div style="page-break-before:always"></div>',$pdfContent);
It defines what separates the invoices.
In some cases, it's possible that the page break leads to an extra page between the invoices.
In that case, change the line to:
$content = implode('',$pdfContent);
and it should work like you expect it to.

The following user(s) said Thank You: leitzdesign

Please Log in or Create an account to join the conversation.

  • Posts: 575
  • Thank you received: 11
  • Hikashop Business
2 years 11 months ago #352045

Hi, Yes that has fixed it.

Thank you

Please Log in or Create an account to join the conversation.

  • Posts: 31
  • Thank you received: 0
  • Hikashop Business
2 years 4 months ago #358060

Thank you for the fix! I have battled this for years because I was told it was a browser issue. This update removed the blank pages, and now I can save multiple invoice PDFs without having to remove numerous blank pages.

Please Log in or Create an account to join the conversation.

  • Posts: 575
  • Thank you received: 11
  • Hikashop Business
1 hour 25 minutes ago #371917

Hi, You have changed the line above and it (line 245) 'still' prints out blank pages.

I have changed it to what you previously suggested, and fortunately it still works by removing them.

Rgds

Please Log in or Create an account to join the conversation.

Time to create page: 0.441 seconds
Powered by Kunena Forum