Add page numbers to invoice

  • Posts: 13
  • Thank you received: 1
  • Hikashop Business
3 weeks 6 hours ago #310355

-- url of the page with the problem -- : www.softdune.com/
-- HikaShop version -- : 4.2.1
-- Joomla version -- : 3.9.5
-- PHP version -- : 7.3.4
-- Browser(s) name and version -- : Chrome 73.0.3683.103 

Is there an way to add the page number and total number of pages on the Invoice.
Example: "pages: 2/4"

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

  • Posts: 66849
  • Thank you received: 9881
  • MODERATOR
3 weeks 33 minutes ago #310356

Hi,

As per this page, you should be able to use these tags in the "footer" setting of the PDF invoice plugin:

[[page_cu]]/[[page_nb]]
stackoverflow.com/questions/6386599/html2pdf-page-numbering

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

  • Posts: 13
  • Thank you received: 1
  • Hikashop Business
2 weeks 6 days ago #310387

Is there a way to do this without the need to buy the HTML2PDF plugin?


I'm currently creating the PDF by pressing the 'PRINT' button during the display of the INVOICE.

You can find it in the invoice.php

<div id="print" style="float:right">
<a class="btn btn-primary" href="#" onclick="document.getElementById('print').style.visibility='hidden';window.focus();window.print();return false;">
<i class="fa fa-print"></i> <?php echo JText::_('HIKA_PRINT'); ?>
</a>
</div>

This opens a screen (which looks like PDF).
In the options it allows to select the Headers/Footers.
The footer includes the page numbering.
But there is information in the footer/header which I would not like to have on my invoice: example: URL of page...

The footer looks like:
www.mysite.com/administrator/index.php?o...=order&task=edit&cid []=91&cancel_redirect=L2FkbWluaXN0cmF0b… 1/2

Do you know how to change these inputs?

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

  • Posts: 66849
  • Thank you received: 9881
  • MODERATOR
2 weeks 4 days ago #310431

Hi,

The footer/header you see there are generated by your browser.
There are some tricks to display HTML on these areas, but it won't work in some browsers and it's a bit cluncky to implement:
stackoverflow.com/questions/20050939/pri...s-when-printing-html

With the PDF invoice plugin, footer and header is part of the way PDF files work so it's much more easy to do.

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

Time to create page: 0.054 seconds
Powered by Kunena Forum