Download the PHP package vigicorp/php-mcpdf without Composer

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

php-mcpdf (fork of php-pdftk)

Readme needs to update.

In brief:

pdftk does not allow to render Unicode fonts into PDF form fields.

mcpdf https://github.com/m-click/mcpdf does.

Build Status Latest Stable Version Total Downloads Latest Unstable Version License

A PDF conversion and form utility based on pdftk.

Features

php-pdftk brings the full power of pdftk to PHP - and more.

Requirements

Note If you're on Ubuntu you may want to install the version from ppa:malteworld/ppa. The default packages seems to use snap an there have been reports about file permission issues with this version. See below for a workaround.

Installation

You should use composer to install this library.

Examples

Operations

Please consult the pdftk man page for each operation to find out how each operation works in detail and which options are available.

Note: Some commands allow to alias your files with a handle (see examples below). In version 2.x of pdftk a handle can be one or more upper case letters.

For all operations you can either save the PDF locally through saveAs($name) or send it to the browser with send(). If you pass a filename to send($name) the client browser will open a download dialogue whereas without a filename it will usually display the PDF inline.

IMPORTANT: You can always only perform one of the following operations on a single PDF instance. Below you can find a workaround if you need multiple operations.

Fill Form

Fill a PDF form with data from a PHP array or an XFDF/FDF file.

Note: When filling in UTF-8 data, you should always add the needAppearances() option. This will make sure, that the PDF reader takes care of using the right fonts for rendering, something that pdftk can't do for you. Also note that flatten() doesn't really work well if you have special characters in your data.

Create a XFDF/FDF file from a PHP array

This is a bonus feature that is not available from pdftk.

Cat

Assemble a PDF from pages from one or more PDF files.

Shuffle

Like cat() but create "streams" and fill the new PDF with one page from each stream at a time.

Burst

Split a PDF file into one file per page.

Add background PDF

Add another PDF file as background.

Add overlay PDF

Add another PDF file as overlay.

Generate FDF

Create a FDF file from a given filled PDF form.

Get PDF data

Read out metadata or form field information from a PDF file.

How to perform more than one operation on a PDF

As stated above, you can only perform one of the preceeding operations on a single PDF instance. If you need more than one operation you can feed one Pdf instance into another:

Options

You can combine the above operations with one or more of the following options.

Shell Command

The class uses php-shellcommand to execute pdftk. You can pass $options for its Command class as second argument to the constructor:

Temporary File

Internally a temporary file is created via php-tmpfile. You can also access that file directly, e.g. if you neither want to send or save the file but only need the binary PDF content:

If you have permission issues you may have to set a directory where your pdftk command can write to:

API

Please consult the source files for a full documentation of each method.


All versions of php-mcpdf with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
mikehaertl/php-shellcommand Version ^1.5.0
mikehaertl/php-tmpfile Version ^1.1.0
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 vigicorp/php-mcpdf contains the following files

Loading the files please wait ....