This is not about adding by composer. This is about downloading and then using it.
For Example: I download TCPDF Library and follows these steps it should be installed and usable but it doesn't works as explained.
When we need use this line?
require_once DIR . '/../../../../../lib/folder/folder/ntlmstream.php';
What is the Role of autoload?
Thanks
Best Answer
This is the way I figured for TCPDF Library:
Download TCPDF from https://github.com/tecnickcom/tcpdf
Change the name of the file root directory after extraction to TCPDF
Inside this directory, there is a tcpdf.php file, change the name to TCPDF
Open the file and change the class name from tcpdf to TCPDF_TCPDF
Copy the files into your Magento “lib/internal” folder in the root Magento installation directory.
=>So it should look like this: lib/internal/TCPDF
Now, write below statement in the class where you want to make tcpdf object:
And use this class as:
Example Code is:
Happy coding :)