Download the PHP
package xaoc/laravel-tcpdf without Composer
On this page you can find all versions of the php package
xaoc/laravel-tcpdf. It is possible to download/install
these versions without Composer. Possible dependencies are resolved
automatically.
Vendor xaoc Package laravel-tcpdf Short Description A simple Laravel 4 service provider with some basic configuration for including the TCPDF library License
MIT
After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.
Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.
In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories.
In this case some credentials are needed to access such packages.
Please use the auth.json textarea to insert credentials, if a package is coming from a private repository.
You can look here for more information.
Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
To use Composer is sometimes complicated. Especially for beginners.
Composer needs much resources. Sometimes they are not available on a simple webspace.
If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
A simple Laravel 5 service provider with some basic configuration for including the TCPDF library
Installation
The Laravel TCPDF service provider can be installed via composer by requiring the xaoc/laravel-tcpdf package in your project's composer.json. (The installation may take a while, because the package requires TCPDF. Sadly its .git folder is very heavy)
Next, add the service provider to app/config/app.php.
Laravel-TCPDF comes with some basic configuration.
If you want to override the defaults, you can publish the config, like so:
php artisan vendor:publish
Now access app/config/laravel-tcpdf.phpto customize.
Extend/Overwrite
Extending or overwriting Laravel TCPDF is easy. Simply extend \Xaoc\LaravelTcpdf\LaravelTcpdf with your own class.
Custom Fonts
To add custom fonts set the fonts_directory in the config, relative to the public path. For example 'fonts/'.
To use a custom font you have to convert a font for TCPDF.
Copy your custom font(s) to your fonts path, in our case public/fonts/.
In your terminal do this:
This uses a little tool provided by TCPDF to convert fonts for TCPDF.
The -i flag is for the input fonts (comma-separated list)
and the -o flag is for the output directory.
Read here all about TCPDF fonts and how to convert them the new way.
Composer command for our command line client (download client)This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free.Standard composer command
The package xaoc/laravel-tcpdf contains the following files
Loading the files please wait ....
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.