Project

General

Profile

Defect #61 » pdf-0.8.4.patch

Konstantin Ershov, 2009-06-02 13:54

View differences:

lib/redmine/export/pdf.rb (working copy)
16 16
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
17 17

  
18 18
require 'iconv'
19
require 'rfpdf/chinese'
19
#require 'rfpdf/chinese'
20 20

  
21 21
module Redmine
22 22
  module Export
23 23
    module PDF
24 24
      include ActionView::Helpers::NumberHelper
25 25

  
26
      class IFPDF < FPDF
26
      #class IFPDF < FPDF
27
      class IFPDF < TCPDF
27 28
        include GLoc
28 29
        attr_accessor :footer_date
29 30

  
......
47 48
            @font_for_content = 'Big5'
48 49
            @font_for_footer = 'Big5'
49 50
          else
50
            @font_for_content = 'Arial'
51
            @font_for_footer = 'Helvetica'
51
#            @font_for_content = 'Arial'
52
#            @font_for_footer = 'Helvetica'
53
            @font_for_content = 'FreeSans'
54
            @font_for_footer = 'FreeSans'
52 55

  
53 56

  
54 57

  
......
114 117
        pdf = IFPDF.new(current_language)
115 118
        title = project ? "#{project} - #{l(:label_issue_plural)}" : "#{l(:label_issue_plural)}"
116 119
        pdf.SetTitle(title)
117
        pdf.AliasNbPages
120
        #pdf.AliasNbPages
121
        pdf.alias_nb_pages
118 122
        pdf.footer_date = format_date(Date.today)
119 123
        pdf.AddPage("L")
120 124
        row_height = 7
......
160 164
      def issue_to_pdf(issue)
161 165
        pdf = IFPDF.new(current_language)
162 166
        pdf.SetTitle("#{issue.project} - ##{issue.tracker} #{issue.id}")
163
        pdf.AliasNbPages
167
        #pdf.AliasNbPages
168
        pdf.alias_nb_pages
164 169
        pdf.footer_date = format_date(Date.today)
165 170
        pdf.AddPage
166 171

  
......
287 292
      def gantt_to_pdf(gantt, project)
288 293
        pdf = IFPDF.new(current_language)
289 294
        pdf.SetTitle("#{l(:label_gantt)} #{project}")
290
        pdf.AliasNbPages
295
        #pdf.AliasNbPages
296
        pdf.alias_nb_pages
291 297
        pdf.footer_date = format_date(Date.today)
292 298
        pdf.AddPage("L")
293 299
        pdf.SetFontStyle('B',12)
294 300

  
(14-14/46)