# How to Install Html2Pdf [back](./README.md) ## Composer and Packagist You have to use Composer to install Html2Pdf. If you do not know what is Composer: * You can find the documentation on https://getcomposer.org/doc/ * You can find all the available packages on https://packagist.org/ * For example, you can find Html2Pdf: https://packagist.org/packages/spipu/html2pdf ## Install You just have to launch the following command on the root folder of your project: ```bash composer require spipu/html2pdf ``` If you do not want to use composer, you will need to: * manually clone the html2pdf repository * manually clone all the repositories of the used dependencies * manage manually the PS4 autoload But it is not the recommaned way to instal Html2Pdf. No help will be provided in this case. ### First Test Here is a HelloWorld example, that you can put on the root folder of your project. ```php require __DIR__.'/vendor/autoload.php'; use Spipu\Html2Pdf\Html2Pdf; $html2pdf = new Html2Pdf(); $html2pdf->writeHTML('