Download the PHP package eprofos/php-wkhtmltopdf without Composer

On this page you can find all versions of the php package eprofos/php-wkhtmltopdf. 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 php-wkhtmltopdf

PHP WKHtmlToPdf

A PHP library for converting HTML to PDF using the wkhtmltopdf command-line tool with extensive customization options.

Installation

You can install the package via composer:

[!CAUTION] This package requires the wkhtmltopdf binary to be installed on your system. You can download it from the official website for your respective operating system.

Usage

Here's a basic example of how to use the library:

This will generate a PDF file named output.pdf from the HTML content of https://example.com, with the following options:

API Reference

The WKHtmlToPdf class provides the following methods:

Constructor

The constructor accepts an optional $binary parameter, which is the path to the wkhtmltopdf binary. If not provided, the constructor will try to use the default paths (C:\Program Files\wkhtmltopdf\bin\wkhtmltopdf.exe on Windows and /usr/local/bin/wkhtmltopdf on other platforms).

Adding Pages

Setting Options

These methods allow you to set various options for the PDF generation process, such as headers, footers, margins, orientation, page size, zoom level, DPI, grayscale mode, and low-quality mode.

Generating the PDF

The generate() method generates the PDF file with the specified output file path. It returns the output of the wkhtmltopdf command.

License

This library is licensed under the MIT License. See the LICENSE file for more details.

Contributing

Contributions are welcome! Please submit pull requests or open issues to help improve this library.

Contact

If you experience bugs or want to request new features, please visit the issue tracker.


All versions of php-wkhtmltopdf with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
symfony/process Version 5.4
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 eprofos/php-wkhtmltopdf contains the following files

Loading the files please wait ....