Giter Club home page Giter Club logo

tfpdf's Introduction

tFPDF

This repository is only made for cloning official tFPDF releases which are available at: http://fpdf.org/en/script/script92.php THERE WILL BE NO DEVELOPMENT IN THIS REPOSITORY!

The only change in this version is that the require_once() calls to font/unifont/ttfonts.php are commented and resolved through the composer autoloader. The demo ex.php was changed accordingly, too.

tFPDF accepts UTF-8 encoded text. It embeds font subsets allowing small PDF files.

It requires a folder 'unifont' as a subfolder of the 'font' folder.

You should make the 'unifont' folder writeable (CHMOD 755 or 644). Although this is not essential, it allows caching of the font metrics the first time a font is used, making subsequent uses much faster.

All tFPDF requires is a .ttf TrueType font file. The file should be placed in the 'unifont' directory. Optionally, you can also define the path to your system fonts e.g. 'C:\Windows\Font' (see the example ex.php file) and reference TrueType fonts in this directory.

Pass a fourth parameter as true when calling AddFont(), and use utf-8 encoded text when using Write() etc.

Installation with Composer

If you're using Composer to manage dependencies, you can use

$ composer require setasign/tfpdf:1.33

or you can include the following in your composer.json file:

{
    "require": {
        "setasign/tfpdf": "1.33"
    }
}

Usage

Notice that tFPDF is not name-spaced. You can extend the class this way:

namespace your\namespace;
    
class Document extends \tFPDF

or create an instance this way:

$pdf = new \tFPDF();

tfpdf's People

Contributors

janslabon avatar iwasherefirst2 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.