Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Footer for quotation pdf
08-22-2018, 04:16 PM,
#1
Footer for quotation pdf
I want to add
This document has been electronically generated and requires no physical signature or stamp
this text in footer of all pages of Quotation print (PDFQuotationPortrait.php).

How and where i can define the footer ? please giude
Reply
08-22-2018, 04:43 PM,
#2
RE: Footer for quotation pdf
If you look at the top of the includes/PDFQuotationPageHeader.php script you should see the following:

if ($PageNumber > 1) { // Inserts a page break if it is not the first page.
$PDF->newPage();
}
If you output the required text immediately before the $PDF->newPage(); command it should be the last thing to appear on each page.before a new one is generated.

You will then need to output the text on the last page, by putting it immediately after the totals in PDFQuotation.php at about line 223.

Tim

NB I haven't tried this but it should work ok.
Reply
08-22-2018, 07:48 PM,
#3
RE: Footer for quotation pdf
Thanks.
I have placed the text before $pdf->newPage();

if ($PageNumber>1) {// Inserts a page break if it is not the first page.
$html1 = 'This document has been electronically generated and requires no physical signature or stamp';
$pdf->writeHTML($html1, true, false, true, false, 'C');
$pdf->newPage();
}

After this i did not get how to output this
Reply
08-22-2018, 08:22 PM,
#4
RE: Footer for quotation pdf
I would use the addText() method to be consistent with the rest of the script.

Don't forget that this will not put the text on the last page, for that you need to add it after the totals as previously described.

Tim
Reply
08-22-2018, 09:29 PM,
#5
RE: Footer for quotation pdf
I have placed the whole text after 223 after the total like this

$html1 = 'This document has been electronically generated and requires no physical signature or stamp';
$pdf->addTextWrap($XPos, $YPos, 100, 18, $html1, 'center');

but it is coming like this    

i did not get how to output in that page.
Reply
08-22-2018, 10:35 PM, (This post was last modified: 08-22-2018, 10:38 PM by VortecCPI.)
#6
RE: Footer for quotation pdf
(08-22-2018, 09:29 PM)Michelle Wrote: I have placed the whole text after 223 after the total like this

$html1 = 'This document has been electronically generated and requires no physical signature or stamp';
$pdf->addTextWrap($XPos, $YPos, 100, 18, $html1, 'center');

but it is coming like this

i did not get how to output in that page.

You need to increment (or decrement) the $YPos variable or fix it to a position on the page:

PHP Code:
$pdf->addTextWrap($XPos$YPos-NN10018$html1'center'); 

or

PHP Code:
$pdf->addTextWrap($XPosNN10018$html1'center'); 

PLEASE NOTE "NN" must be determined by trial and error.

If you attach your current PHP files (header and content) I will try to help...
https://www.linkedin.com/in/eclipsepaulbecker
Reply
08-22-2018, 10:43 PM,
#7
RE: Footer for quotation pdf
Also looking at the output 18 seems too big a font size, I would reduce it, and 100 is too short a length. As Paul says this is all trial and error to get it as you want it.

Tim
Reply
08-23-2018, 12:01 AM,
#8
RE: Footer for quotation pdf
Thanks!

Here i am attaching the PDFQuotation.php. I could not attach PDFQuotationPageHeader.inc here. I have added footer lines in PDFQuotation.php line 223. But i did not change any content in PDFQuotationPageHeader.inc.





Attached Files
.php   PDFQuotation.php (Size: 11.17 KB / Downloads: 1)
Reply
08-23-2018, 12:29 AM,
#9
RE: Footer for quotation pdf
(08-23-2018, 12:01 AM)Michelle Wrote: Thanks!

Here i am attaching the PDFQuotation.php. I could not attach PDFQuotationPageHeader.inc here. I have added footer lines in PDFQuotation.php line 223. But i did not change any content in PDFQuotationPageHeader.inc.

Try this out...


Attached Files
.php   PDFQuotation.php (Size: 10.89 KB / Downloads: 1)
https://www.linkedin.com/in/eclipsepaulbecker
Reply
08-23-2018, 01:39 PM,
#10
RE: Footer for quotation pdf
Thanks a lot. This is exactly what i wanted.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)