Download the PHP package dawood/phpchromepdf without Composer

On this page you can find all versions of the php package dawood/phpchromepdf. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

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.
Please rate this library. Is it a good library?

Informations about the package phpchromepdf

PHP ChromeToPdf

Latest Stable Version Total Downloads License

PHP ChromeToPdf provides a simple and clean interface to ease PDF and image creation with Google Chrome. The Google Chrome must be installed and working on your system. See the section below for details.

History

Every time i had convert url to pdf or to take screenshot of some url i had to install several libraries , i know there are very good libraries available like phantomJs,wkhtmltopdf and some others... but there are always rendering issue
like some supports bootstrap ,some not some time html5 problem etc..
and this was all annoying so i decided to make this little wrapper around chrome
by using chrome results i achieved following results.

in-fact painless conversion

Installation ( Laravel )

This package supports Laravel. Install it in a Laravel application as follows:

done.

Installation ( Simple PHP App )

Install the package through composer:

Make sure, that you include the composer autoloader somewhere in your codebase.

Examples

There are several examples provided in examples folder too

Url To PDF (accessing site as bigger browser)

Url To PDF (accessing site as mobile browser)

Take screenshot of url (accessing site as bigger browser)

Take screenshot of url (accessing site as mobile browser)

Take screenshot of Html File

convert Html file to pdf

convert Html code to pdf / screenshot

convert Html code to pdf / screenshot and save at desired location

Setting options

The google-chrome shell command accepts different types of options: for complete list of options you can visit https://peter.sh/experiments/chromium-command-line-switches/

Wrapper Methods

if your argument doesn't has values like --headless you can pass empty value e.g [--headless=>'']

there are some other getters available too in case you need getUrl , getBinaryPath , getOutputDirectory

Installation of google-Chrome (linux/mac )

then try running google-chrome from shell to verify it's installation

Installation of google-Chrome (Windows)

then try running C:\Program Files (x86)\Google\Chrome\Application>chrome.exe --headless from cmd terminal to verify it's installation

Note the path of chrome directory can be different in your case

License

The PhpChromeToPdf is open-sourced software licensed under the MIT license.

Contribution

Thanks to all of the contributors ,
Check Contribution for contribution rules

Author

Dawood Ikhlaq and Open source community


All versions of phpchromepdf with dependencies

PHP Build Version
Package Version
Requires mikehaertl/php-shellcommand Version ^1.2
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 dawood/phpchromepdf contains the following files

Loading the files please wait ....