diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-05-09 11:12:48 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-05-09 11:12:48 +0000 |
commit | b97087bad525f07cb96fef9a8b64fa4f23957fd1 (patch) | |
tree | 165a0b9939af516adf9677bcfd620406a805e7f5 /lib/redmine/export | |
parent | 29f6dd2a9e770bdc2d9211b42abca85d75d8cc09 (diff) | |
download | redmine-b97087bad525f07cb96fef9a8b64fa4f23957fd1.tar.gz redmine-b97087bad525f07cb96fef9a8b64fa4f23957fd1.zip |
PDF: remove unused Redmine FPDF class (#8312).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5721 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/export')
-rw-r--r-- | lib/redmine/export/pdf.rb | 88 |
1 files changed, 0 insertions, 88 deletions
diff --git a/lib/redmine/export/pdf.rb b/lib/redmine/export/pdf.rb index 177f5c835..7c2bf6636 100644 --- a/lib/redmine/export/pdf.rb +++ b/lib/redmine/export/pdf.rb @@ -120,94 +120,6 @@ module Redmine end end - class IFPDF < FPDF - include Redmine::I18n - attr_accessor :footer_date - - def initialize(lang) - super() - if RUBY_VERSION < '1.9' - @ic = Iconv.new(l(:general_pdf_encoding), 'UTF-8') - end - set_language_if_valid lang - case l(:general_pdf_encoding).upcase - when 'CP949' - extend(PDF_Korean) - AddUHCFont() - @font_for_content = 'UHC' - @font_for_footer = 'UHC' - when 'CP932' - extend(PDF_Japanese) - AddSJISFont() - @font_for_content = 'SJIS' - @font_for_footer = 'SJIS' - when 'GB18030' - extend(PDF_Chinese) - AddGBFont() - @font_for_content = 'GB' - @font_for_footer = 'GB' - when 'BIG5' - extend(PDF_Chinese) - AddBig5Font() - @font_for_content = 'Big5' - @font_for_footer = 'Big5' - else - @font_for_content = 'Arial' - @font_for_footer = 'Helvetica' - end - SetCreator(Redmine::Info.app_name) - SetFont(@font_for_content) - end - - def SetFontStyle(style, size) - SetFont(@font_for_content, style, size) - end - - def SetTitle(txt) - txt = begin - utf16txt = Iconv.conv('UTF-16BE', 'UTF-8', txt) - hextxt = "<FEFF" # FEFF is BOM - hextxt << utf16txt.unpack("C*").map {|x| sprintf("%02X",x) }.join - hextxt << ">" - rescue - txt - end || '' - super(txt) - end - - def textstring(s) - # Format a text string - if s =~ /^</ # This means the string is hex-dumped. - return s - else - return '('+escape(s)+')' - end - end - - def fix_text_encoding(txt) - RDMPdfEncoding::rdm_pdf_iconv(@ic, txt) - end - - def RDMCell(w,h=0,txt='',border=0,ln=0,align='',fill=0,link='') - Cell(w,h,fix_text_encoding(txt),border,ln,align,fill,link) - end - - def RDMMultiCell(w,h=0,txt='',border=0,align='',fill=0) - MultiCell(w,h,fix_text_encoding(txt),border,align,fill) - end - - def Footer - SetFont(@font_for_footer, 'I', 8) - SetY(-15) - SetX(15) - RDMCell(0, 5, @footer_date, 0, 0, 'L') - SetY(-15) - SetX(-30) - RDMCell(0, 5, PageNo().to_s + '/{nb}', 0, 0, 'C') - end - alias alias_nb_pages AliasNbPages - end - # Returns a PDF string of a list of issues def issues_to_pdf(issues, project, query) pdf = ITCPDF.new(current_language) |