Feature #712

Export PDF en UTF8

Added by moyo over 7 years ago. Updated 8 months ago.

Status:Closed Start date:
Priority:Normal Due date:
Assignee:moyo % Done:

100%

Category:Export / Import
Target version:0.85

Description

TODO : Delete unifont ?

see #1303

une piste :

http://glpi-project.org/forum/viewtopic.php?pid=22740#p22740

Update:

Seems like I found one:

http://www.tecnick.com/public/code/cp_dpage.php?aiocp_dp=tcpdf

TCPDF

TCPDF is an Open Source PHP class for generating PDF files on-the-fly without requiring external extensions.
TCPDF is an extension and improvement of the FPDF class by Olivier Plathey (http://www.fpdf.org).

Main Features:

  • supports all ISO page formats;
  • supports UTF-8 Unicode;
  • includes methods to publish some xhtml code, supporting the following elements: h1, h2, h3, h4, h5, h6, b, u, i, a, img, p, br, strong, em, font, blockquote, li, ul, ol, hr, td, th, tr, table, sup, sub, small;
  • includes a method to print various barcode formats using an improved version of "Generic Barcode Render Class" by Karim Mribti (http://www.mribti.com/barcode/) (require GD library: http://www.boutell.com/gd/)
  • supports TrueTypeUnicode, TrueType, Type1 and encoding;

etc.etc.

diff.txt - Use of TCPDF (4.7 kB) moyo, 12/18/2012 05:11 pm


Related issues

related to GLPI-PROJECT - Task #1303: Find a new PDF library Closed
blocked by GLPI Documentation - Task #4364: Export PDF en UTF8 Closed 06/04/2013

Associated revisions

Revision 20224
Added by moyo about 1 year ago

[0.85] Export PDF en UTF8 fixed #712 use tcpdf and unifont

History

Updated by moyo over 7 years ago

Interesting library but not really usable for GLPI.
Difficulty to display clean tabular....

Updated by moyo over 7 years ago

try ufpdf with fpdf tools to print clean array
http://www.acko.net/blog/ufpdf?page=1

Updated by moyo over 3 years ago

  • Assignee deleted (8)
  • Target version changed from Unplanned to 0.85

Updated by moyo over 1 year ago

First try to use TCPDF. Work fine with arabic chars.
For chinese, need to use another font (maybe use unifont for these languages)

Updated by moyo over 1 year ago

For chinese with unifont :
// For standard language
$pdf->setFontSubsetting(false);
// set font
$fontname = $pdf->addTTFfont('../lib/tcpdf/fonts/unifont.ttf', 'TrueTypeUnicode', '', 32);
$pdf->SetFont($fontname, '', 8);

Updated by moyo about 1 year ago

  • Assignee set to moyo

Updated by moyo about 1 year ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Applied in changeset r20224.

Updated by moyo about 1 year ago

  • Status changed from Resolved to Closed

Updated by moyo 11 months ago

  • Status changed from Closed to New
  • % Done changed from 100 to 80

Updated by remi 11 months ago

  • Status changed from New to Resolved
  • % Done changed from 80 to 100
See
  • r21056 : user can select which font to use
  • r21057 : provides DejavuSans which give good result (and size) in most european locale and cidfont for asiatic
  • r21058 : add tcpdf_addfont command (from upstream) to easy allow admin to add more fonts
Notice:
  • italic variant are not used, but can be used later or by plugin.

Updated by moyo 8 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF