Download the PHP package konekt/pdf-invoice without Composer

On this page you can find all versions of the php package konekt/pdf-invoice. 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?
konekt/pdf-invoice
Rate from 1 - 5
Rated 5.00 based on 1 reviews

Informations about the package pdf-invoice

PDF Invoice

Tests StyleCI Packagist Stable Version Packagist downloads

This is a streamlined fork of pdf-invoicr.

Changes:

PHP Compatibility

PHP PDF Invoice
5.6 1.0 - 1.6
7.0 1.0 - 1.6
7.1 1.0 - 1.6
7.2 1.0 - 1.6
7.3 1.0+
7.4 1.0+
8.0 1.7+
8.2 1.13+

Introduction

PHP Invoice is a simple object oriented PHP class to generate beautifully designed invoices, quotes or orders with just a few lines of code. Brand it with your own logo and theme color, add unlimited items and total rows with automatic paging. You can deliver the PDF ouput in the user's browser, save on the server or force a file download. PHP Invoice is fully customizable and can be integrated into any well known CMS.

Multi-languages & Currencies

PHP Invoice has built in translations in English, Dutch, French, German, Spanish and Italian (you can easily add your own if needed) and you can set the currency needed per document.

Additional Titles, Paragraphs And Badges

Extra content (titles and multi-line paragraphs) can be added to the bottom of the document. You might use it for payment or shipping information or any other content needed.

Installation

Examples

There are 3 examples included in the examples/ folder of this repo:

Create A New Invoice

TODO: After code review, update README documentation with new consts.

Make sure that the default php date timezone is set before using the class.

In this simple example we are generating an invoice with custom logo and theme color. It will contain 2 products and a box on the bottom with VAT and total price. Then we add a "Paid" badge right before the output.

Documentation

Create Instances

Parameter Type Accepts Note
size string A4 (default)
Letter
Legal
Set your document size
currency string any string (e.g. "$", "£", "€") Set the currency that you want to use
language string en (default), nl, fr, de, es, it A language that exists in the inc/languages folder

Number Formatting

How do you want to show your numbers?

Parameter Type Accepts Note
decimalpoint string Commonly used is '.' (default) or ',' What string to use for decimal point
seperator string Commonly used is '.' or ',' (default) What string to use for thousands separator
alignment string 'left' (default) or 'right' Where to show the currency symbol
space boolean true (default) or false Show a space between currency symbol and price
negativeParenthesis boolean true or false (default) Remove the negative sign and wrap in parenthesis

Color

Set a custom color to personalize your invoices.

Add Logo

Parameter Type Accepts Note
image string Local path or remote url of the image Preferably a good quality transparant png image
maxwidth (optional) int The width (in mm) of the bounding box where the image will be fitted in
maxheight (optional) int The height (in mm) of the bounding box where the image will be fitted in

Document Title

Invoice Number

Date

Due Date

Issuer Information

Set your company details.

Client Information

Flip Flop

Switch the horizontal positions of your company information and the client information. By default, your company details are on the left.

Issuer and Client header titles

Hide the issuer and client header row

Adding Items

Add a new product or service row to your document below the company and client information. PHP Invoice has automatic paging so there is absolutely no limit.

The fields description, quantity, vat, price, discount and total are all optinoal. To disable any of this for an invoice line, pass false for the corresponding argument.

Item line description font size

Change the font size for the product description. Default is 7

Adding Totals

Add a row below the products and services for calculations and totals. You can add unlimited rows.

Adding A Badge

Adds a badge to your invoice below the products and services. You can use this for example to display that the invoice has been payed.

badge {string} A string with the text of the badge.

It is possible to set the color of the badge as the second parameter:

CSS color names ('red', 'cyan', 'fuchsia', etc) are NOT supported

Add Title

You can add titles and paragraphs to display information on the bottom part of your document such as payment details or shipping information.

title {string} A string with the title to display in the badge.

Add Paragraph

You can add titles and paragraphs to display information on the bottom part of your document such as payment details or shipping information.

Paragraph {string} A string with the paragraph text with multi-line support. Use either <br> or \n to add a line-break.

Change a Language Term on the fly

You can change a Language Term with this method. This overwrites the Term from the Language File.

Footer

A small text you want to display on the bottom left corner of the document.

note {string} A string with the information you want to display in the footer.

Rendering The Invoice

Credits


All versions of pdf-invoice with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3|^8.0
ext-iconv Version *
ext-mbstring Version *
setasign/fpdf Version ~1.8.1
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 konekt/pdf-invoice contains the following files

Loading the files please wait ....