How to configure the page size to be A4 instead of pre-defined which prints 2 pa

  • Posts: 69
  • Thank you received: 5
2 years 7 months ago #340673

-- url of the page with the problem -- : www.politikchronist.org
-- HikaShop version -- : 4.5.0
-- Joomla version -- : 3.10.5
-- Error-message(debug-mod must be tuned on) -- : Printer A4 prints 2 pages

Hello from Germany,
we have the problem, that invoices always are printed in 2 pages but only the 1st contains some text. The reason we believe is due to the fact, that we print on A4 but that the predefined paper size is different. So please help us to find where to change the paper size to A4.
Thanks in advance.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 7 months ago #340682

Hi,

The way print works is that HikaShop provides the HTML to the browser, and then the browser renders the HTML but instead of outputing it on the screen, it outputs it on paper through the printer system of the operating system.
So it's not HikaShop which selects the paper size when this happens but the browser (usually it's the user when the browser displays the print preview screen).
So the first question which comes to mind is whether or not you have the issue with different browsers ?
Also, if you edit the file order / invoice via the menu Display>Views (which is used in the backend to output the HTML of the invoice), you can see this code at the end:

$navigator_check = hikashop_getNavigator();
if ($navigator_check["name"] != "Apple Safari") {
?>
<div style="page-break-after:always"></div>
<?php
}
This adds a page break after div at the end of the invoice for browsers other than Safari.
So this piece of code might be linked to the issue you're seeing. So a test you can do is to remove that piece of code and see how it goes.

The following user(s) said Thank You: politikchronist

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

  • Posts: 69
  • Thank you received: 5
2 years 7 months ago #340704

Thank you! Deleting the text already solved the problem!

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

Time to create page: 0.057 seconds
Powered by Kunena Forum