Menu Content

Podpora

> Diskusní fóra, FAQs & placená podpora
Welcome, Guest
Username Password: Remember me

Placing Footer on last page of despatch note only
(1 viewing) (1) Guest
PDF Invoice generator and editor for Joomla and VirtueMart.

If your topic falls within one of the subcategories, then please post it directly there. Post to this parent category only if your question does not match any subcategory topic.
  • Page:
  • 1

TOPIC: Placing Footer on last page of despatch note only

Placing Footer on last page of despatch note only 10 years, 2 months ago #20511

I've been looking through the TCPDF code and trying to put a footer on the last page only of the despatch note to no avai. Has anyone else succeeded in doing this? I've tried altering the Footer function in invoicepdf.php to this:

$var1 = (int)$this->getPage();
$var2 = (int)$this->getNumPages();
$code .= $this->html->generateStockLabelAddresses($var1,$var2);

and then creating copies of the generateAddresses, generateAddress functions named differently in invoicehtml and checking for this:

if ($this->deliveryNote){
if ($var1 == $var2){

but the 2 values are the same it seems, any ideas? Unfortunately php isnt my language of choice so i may be making a simple error i don't know :s
Last Edit: 10 years, 2 months ago by ctronix12Inv.
The topic has been locked.

Re: Placing Footer on last page of despatch note only 10 years, 2 months ago #20547

  • jaku
Hello,
it depends on how many pages does your Delivery note have? If it fits into one page, then of course the values will be same. However, with document that has more pages, they shoud be different.

You may not be using the correct TCPDF functions.
Try with
$this->getPageNumGroupAlias() to get current page number
and
$this->getPageGroupAlias() to get total page count
The topic has been locked.

Re: Placing Footer on last page of despatch note only 10 years, 2 months ago #20584

Many thanks, those functions work as intended and it is now displaying a footer on the last page of the despatch note only.

Unfortunately i've noticed an error in some of the invoices/despatch notes it generates:

When an invoice is very long so that it stretches to multiple pages it generates an error when opened in acrobat reader:

"An error exists on this page. Acrobat may not display the page correctly. Please contact the person who created the PDF document to correct the problem."

The file is viewable in acrobat reader tho and bar the error looks like an invoice.

Ive noticed when this occurs the extra fields section can be split over two pages and the total section can be written on top of the header of the extra page.

Is there any way to debug what this error could be? Ive tried disabling the extra fields section but the error still occurs and on the invoices it doesnt use a footer so i dont think it is the custom footer i have.
The topic has been locked.

Re: Placing Footer on last page of despatch note only 10 years, 2 months ago #20648

  • jaku
Hello,

might be due to wrong usage of TCPDF functions or even buf in TCPDF self.
However, this is already out of range of these forums that are to support the original component.

If you want our assinstance with this, you may book some paid technical support at:
www.artio.net/e-shop/support-services/joomla-related-support-1h
The topic has been locked.
  • Page:
  • 1
Přihlášení uživatele Prázdný