Feature #712

Export PDF en UTF8

Added by moyo over 8 years ago. Updated over 1 year ago.

Status:ClosedStart date:
Priority:NormalDue 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 Magnifier - Use of TCPDF (4.67 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 2 years ago

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

History

#1 Updated by moyo over 8 years ago

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

#2 Updated by moyo over 8 years ago

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

#3 Updated by moyo about 4 years ago

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

#5 Updated by moyo about 2 years ago

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

#6 Updated by moyo about 2 years 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);

#7 Updated by moyo about 2 years ago

  • Assignee set to moyo

#8 Updated by moyo about 2 years ago

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

Applied in changeset r20224.

#9 Updated by moyo about 2 years ago

  • Status changed from Resolved to Closed

#10 Updated by moyo almost 2 years ago

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

#11 Updated by remi almost 2 years 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.

#12 Updated by moyo over 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF