HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   Billing module invoice template (http://www.howtoforge.com/forums/showthread.php?t=56733)

Davide 30th March 2012 01:55

Billing module invoice template
 
Hi

Is it possible to create a personalized pdf invoice template based in existing templates?

I tried duplicating existing template directory with another name, and my "new template" is listed as an option, but it fails when trying to use it.

till 30th March 2012 08:23

Quote:

Is it possible to create a personalized pdf invoice template based in existing templates?
Yes, just make a copy of one of the xisting templates. Ensure that the dircetory name has no white spaces as in your first attempt, use underscore "_" instead.

Then open the make_pdf_invoice.php file in your newly created directory and edit the calssname to match the new name. There are instructions in the file:

Code:

/*
  Here we extend tfpdf and create a new class. the name of the Class has to be
  PDFInvoice_ plus the name of the template, in this case "default" so the full
  name of the class is "PDFInvoice_default".
*/

class PDFInvoice_default extends tFPDF
{
........



All times are GMT +2. The time now is 18:38.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.