[Skip to main content](#vessel-content)

#   Invoice PDF prints off Black Page?

##

- **[mohairbears](/forum/user/916-mohairbears "View mohairbears's Profile")**
- [![mohairbears's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/916-mohairbears "View mohairbears's Profile") Topic Author
- [ Offline](/forum/user/916-mohairbears)

Less More

- Posts: 610
- Thank you received: 13
-

3 years 5 months ago -  3 years 5 months ago [\#351932](#351932) by [mohairbears](/forum/user/916-mohairbears "View mohairbears's Profile")  *[Invoice PDF prints off Black Page?](/forum/35-orders-management/906443-invoice-pdf-prints-off-black-page#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")* was created by *[mohairbears](/forum/user/916-mohairbears "View mohairbears's Profile")*

-- 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
[ ![pdf&#95;blank&#95;1&#95;2023-05-24.jpg](/forum/attachment/57095) ](/forum/attachment/57095 "...2023-05-24.jpg")

[ ![pdf&#95;blank&#95;2.jpg](/forum/attachment/57093) ](/forum/attachment/57093 "pdf&#95;blank&#95;2.jpg")

[ ![pdf&#95;blank&#95;3.jpg](/forum/attachment/57092) ](/forum/attachment/57092 "pdf&#95;blank&#95;3.jpg")

- [ ![pdf&#95;blank&#95;3.jpg](/forum/attachment/57092) ](/forum/attachment/57092 "pdf&#95;blank&#95;3.jpg") [ ](/forum/attachment/57092?download=1 "pdf&#95;blank&#95;3.jpg")
- [ ![pdf&#95;blank&#95;2.jpg](/forum/attachment/57093) ](/forum/attachment/57093 "pdf&#95;blank&#95;2.jpg") [ ](/forum/attachment/57093?download=1 "pdf&#95;blank&#95;2.jpg")
- [ ![pdf&#95;blank&#95;1.jpg](/forum/attachment/57094) ](/forum/attachment/57094 "pdf&#95;blank&#95;1.jpg") [ ](/forum/attachment/57094?download=1 "pdf&#95;blank&#95;1.jpg")
- [ ![pdf&#95;blank&#95;1&#95;2023-05-24.jpg](/forum/attachment/57095) ](/forum/attachment/57095 "...2023-05-24.jpg") [ ](/forum/attachment/57095?download=1 "...2023-05-24.jpg")

Last edit: 3 years 5 months ago by [mohairbears](/forum/user/916-mohairbears "View mohairbears's Profile").

The following user(s) said Thank You: [leitzdesign](/forum/user/39770-leitzdesign "View leitzdesign's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50LzkwNjQ0My1pbnZvaWNlLXBkZi1wcmludHMtb2ZmLWJsYWNrLXBhZ2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14283
-
-

3 years 5 months ago [\#351942](#351942) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Invoice PDF prints off Black Page?](/forum/35-orders-management/906443-invoice-pdf-prints-off-black-page#351942 "-- 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")*

Hi,

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

$content = implode('&lt;div style="page-break-before:always"&gt;&lt;/div&gt;',$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: Code:

$content = implode('',$pdfContent);

and it should work like you expect it to.

The following user(s) said Thank You: [leitzdesign](/forum/user/39770-leitzdesign "View leitzdesign's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50LzkwNjQ0My1pbnZvaWNlLXBkZi1wcmludHMtb2ZmLWJsYWNrLXBhZ2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[mohairbears](/forum/user/916-mohairbears "View mohairbears's Profile")**
- [![mohairbears's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/916-mohairbears "View mohairbears's Profile") Topic Author
- [ Offline](/forum/user/916-mohairbears)

Less More

- Posts: 610
- Thank you received: 13
-

3 years 5 months ago [\#352045](#352045) by [mohairbears](/forum/user/916-mohairbears "View mohairbears's Profile")  Replied by *[mohairbears](/forum/user/916-mohairbears "View mohairbears's Profile")* on topic *[Invoice PDF prints off Black Page?](/forum/35-orders-management/906443-invoice-pdf-prints-off-black-page#352045 "-- 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")*

Hi, Yes that has fixed it.

Thank you

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50LzkwNjQ0My1pbnZvaWNlLXBkZi1wcmludHMtb2ZmLWJsYWNrLXBhZ2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[leitzdesign](/forum/user/39770-leitzdesign "View leitzdesign's Profile")**
- [![leitzdesign's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar39770.png)](/forum/user/39770-leitzdesign "View leitzdesign's Profile")
- [ Offline](/forum/user/39770-leitzdesign)

Less More

- Posts: 32
- Thank you received: 0
-
-

2 years 9 months ago [\#358060](#358060) by [leitzdesign](/forum/user/39770-leitzdesign "View leitzdesign's Profile")  Replied by *[leitzdesign](/forum/user/39770-leitzdesign "View leitzdesign's Profile")* on topic *[Invoice PDF prints off Black Page?](/forum/35-orders-management/906443-invoice-pdf-prints-off-black-page#358060 "-- 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")*

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50LzkwNjQ0My1pbnZvaWNlLXBkZi1wcmludHMtb2ZmLWJsYWNrLXBhZ2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[mohairbears](/forum/user/916-mohairbears "View mohairbears's Profile")**
- [![mohairbears's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/916-mohairbears "View mohairbears's Profile") Topic Author
- [ Offline](/forum/user/916-mohairbears)

Less More

- Posts: 610
- Thank you received: 13
-

5 months 2 weeks ago [\#371917](#371917) by [mohairbears](/forum/user/916-mohairbears "View mohairbears's Profile")  Replied by *[mohairbears](/forum/user/916-mohairbears "View mohairbears's Profile")* on topic *[Invoice PDF prints off Black Page?](/forum/35-orders-management/906443-invoice-pdf-prints-off-black-page#371917 "-- 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")*

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50LzkwNjQ0My1pbnZvaWNlLXBkZi1wcmludHMtb2ZmLWJsYWNrLXBhZ2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14283
-
-

5 months 2 weeks ago [\#371918](#371918) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Invoice PDF prints off Black Page?](/forum/35-orders-management/906443-invoice-pdf-prints-off-black-page#371918 "-- 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")*

Hi,

Since the version of the PDF invoice plugin you have, the page break between invoices is no longer hardcoded in the PHP file. It is now a translation string called INVOICE_SEPARATOR, so that you can change it from Joomla without having to edit the plugin again after each update.

To override it:

1. In Joomla, go to System, Manage, Language Overrides.
2. Pick the site or administrator side (whichever you generate the PDFs from) and your language.
3. Click New, set the language constant to INVOICE_SEPARATOR and leave the override text empty (or set it to whatever you want between invoices).
4. Save.

Once that is in place, no more blank page between invoices and the change will survive future HikaShop updates and PDF invoice plugin updates so you do not have to re-apply your file edit each time. Could you try that on your end and let us know how it goes?

The following user(s) said Thank You: [leitzdesign](/forum/user/39770-leitzdesign "View leitzdesign's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50LzkwNjQ0My1pbnZvaWNlLXBkZi1wcmludHMtb2ZmLWJsYWNrLXBhZ2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.146 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
