Patch #8312

Switch to TCPDF from FPDF for PDF export

Added by Jun NAITOH over 6 years ago. Updated over 6 years ago.

Status:ClosedStart date:2011-05-06
Priority:NormalDue date:
Assignee:Toshi MARUYAMA% Done:

0%

Category:PDF export
Target version:1.2.0

Description

This patch switches to TCPDF from FPDF in Japanese/Chinese/Korean (Thai) PDF.

I am expecting the following things by this patch.

  • Improvement of maintainability
  • Improvement of compatibility for Redmine plug-in
  • new TCPDF API (writeHTML/writeHTMLCell)

Before

general_pdf_encoding Class Font name Font type Support locales
Not UTF-8 FPDF UHC,SJIS, GB, Big5, Helvetica Non embedded ja,ko,zh, zh-TW FreeSans doesn't support Japanese/Chinese/Korean/Thai characters
UTF-8 TCPDF FreeSans Embedded Others Helvetica doesn't support Cyrillic

After

general_pdf_encoding Class Font name Font type Support locales
Not UTF-8 TCPDF UHC,SJIS, GB, Big5, Helvetica Non embedded ja,ko,zh, zh-TW FreeSans doesn't support Japanese/Chinese/Korean/Thai characters
UTF-8 TCPDF FreeSans Embedded Others Helvetica doesn't support Cyrillic

switch_from_fpdf_to_tcpdf_r5670.patch Magnifier (17 KB) Jun NAITOH, 2011-05-06 16:06


Related issues

Related to Redmine - Defect #61: Broken character encoding in pdf export Closed
Related to Redmine - Defect #8566: Exported PDF UTF-8 Vietnamese not correct Closed 2011-06-08

Associated revisions

Revision 5713
Added by Toshi MARUYAMA over 6 years ago

PDF: move fix_text_encoding() logic to new method for common use in FPDF and TCPDF (#61, #8312).

Revision 5715
Added by Toshi MARUYAMA over 6 years ago

PDF: replace invalid sequence in converting if encoding destination is UTF-8 (#61, #8312).

Revision 5716
Added by Toshi MARUYAMA over 6 years ago

PDF: replace invalid UTF-8 sequences in TCPDF (#61, #8312).

There is no guarantees that database strings are valid UTF-8 in Ruby 1.8 MySQL and SQLite3.

Revision 5717
Added by Toshi MARUYAMA over 6 years ago

PDF: import tcpdf.rb patch (#8312).

Contributed Jun NAITOH.

Revision 5718
Added by Toshi MARUYAMA over 6 years ago

PDF: switch encoding and font whether CJK and Thainland non UTF-8 or not in TCPDF Redmine class (#8312).

Contributed Jun NAITOH.

Revision 5720
Added by Toshi MARUYAMA over 6 years ago

PDF: import CJK patches and all languages use TCPDF (#8312).

Contributed Jun NAITOH.

Revision 5721
Added by Toshi MARUYAMA over 6 years ago

PDF: remove unused Redmine FPDF class (#8312).

Revision 5723
Added by Toshi MARUYAMA over 6 years ago

PDF: more strict Redmine TCPDF class initialize() (#8312).

Revision 7785
Added by Toshi MARUYAMA about 6 years ago

pdf: remove unused "require 'rfpdf/fpdf'" (#8312)

History

#1 Updated by Toshi MARUYAMA over 6 years ago

  • Assignee set to Toshi MARUYAMA

#2 Updated by Toshi MARUYAMA over 6 years ago

  • Status changed from New to Closed
  • Target version set to 1.2.0

Committed in r5721, thanks.

Also available in: Atom PDF