How to add TCPDF to Library to Magento 1

Updated . Posted . Visible to the public.

We can add a 3rd-party to library to Magento, for example TCPDF Show archive.org snapshot .

  1. Download the library and unzip.
  2. Place the unzip contents to /lib/Tcpdf/.
  3. For autoloading by Magento, we need to change the main application class name to Mage standard (separated by underscore): <folder-name>_<original-class-name>; for TCPDF, we edit the file Tcpdf.php: the original class name is class TCPDF, we change it to class Tcpdf_Tcpdf.
    1. class Tcpdf_Tcpdf
    2. class Tcpdf_Tcpdf2DBarcode
  4. No we can instantiate the class like this: $pdf = new Tcpdf_Tcpdf();
kiatng
Last edit
kiatng
Posted by kiatng to OpenMage (2019-11-14 08:38)