Générateur de PDF (TCPDF)

De OviWiki
Révision de 29 avril 2009 à 08:18 par Paul (discussion | contributions) (Nouvelle page : Catégorie:Documentation Fonctionnalités Cette fonctionnalité permet de générer des fichiers PDF à partir du programme PHP. Pour plus d'informations, voir la [http://www.te...)

(diff) ← Version précédente | Voir la version courante (diff) | Version suivante → (diff)
Aller à : navigation, rechercher


Cette fonctionnalité permet de générer des fichiers PDF à partir du programme PHP. Pour plus d'informations, voir la documentation de TCPDF

La fonctionnalité est basée sur TCPDF 4.1.004

Main Features:

  • no external libraries are required;
  • supports all ISO page formats;
  • supports UTF-8 Unicode and Right-To-Left languages;
  • supports document encryption;
  • includes methods to publish some HTML code;
  • includes graphic and transformation methods;
  • includes bookmarks;
  • includes Javascript and forms support;
  • includes a method to print various barcode formats;
  • supports TrueTypeUnicode, OpenTypeUnicode, TrueType, OpenType, Type1 and CID-0 fonts;
  • supports custom page formats, margins and units of measure;
  • includes methods for page header and footer management;
  • supports automatic page break;
  • supports automatic page numbering and page groups;
  • supports automatic line break and text justification;
  • supports JPEG and PNG images whitout GD library and all images supported by GD: GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM;
  • supports stroke and clipping mode for text;
  • supports clipping masks;
  • supports Grayscale, RGB, CMYK, Spot colors and transparency;
  • supports links and annotations;
  • supports page compression (requires zlib extension);
  • supports user rights management so Adobe Reader users can save filled-in copies of forms they complete.
Le chemin complet de la fonctionnalité
TcPdf
Documentation du parent
Pas de parent
Module
LibPdf
version du module
0.0.1


getDescription

Méthode commune à toutes les librairies pour obtenir la description de l'objet partagé.

$instance = bab_functionality::get('TcPdf');

$description = $instance->getDescription();



createDocument($orientation, $unit, $format, $unicode, $encoding)

Créer une instance de l'objet TCPDF

includeTCPDF()

Inclure les fichiers et les configurations nécesssaires pour accéder à la classe TCPDF


getLanguageArray()

Retourne un tableau de configuration pour TCPDF qui contiens les paramètres de langue. Les informations sont initialisées à partir de la configuration d'Ovidentia


getTableHelper()

Retourne une instance d'objet permettant de faciliter la création de tableau pour TCPDF

exemple :

<source lang="php">


$table = bab_functionality::get('TcPdf') ->getTableHelper() ->setCellWith(50, '%') ->setCellHeight(6) ->setBorder('LR');

$applicant = $table->createColumn(); $responsible = $table->createColumn();

$r = $table->createRow()->setBackgroundColor(220, 220, 220)->setFontStyle('B')->setBorder('TLR');

$r->createCell()->inColumn($applicant) ->setData(utf8_encode(bvap_translate('Applicant'))); $r->createCell()->inColumn($responsible)->setData(utf8_encode(bvap_translate('Replying')));

$table->createMultiCells($pdf);

</source>