Project

General

Profile

Defect #61 » 61.patch

Jan Topiński, 2008-11-16 15:02

View differences:

app/helpers/ifpdf_helper.rb (kopia robocza)
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 'fpdf/chinese'
20 20

  
21 21
module IfpdfHelper  
22 22
  
23
  class IFPDF < FPDF
23
  class IFPDF < TCPDF
24 24
    include GLoc
25 25
    attr_accessor :footer_date
26 26
    
......
44 44
        @font_for_content = 'Big5'
45 45
        @font_for_footer = 'Big5'
46 46
      else
47
        @font_for_content = 'Arial'
48
        @font_for_footer = 'Helvetica'              
47
        @font_for_content = 'FreeSans'
48
        @font_for_footer = 'FreeSans'              
49

  
49 50
      end
50 51
      SetCreator(Redmine::Info.app_name)
51 52
      SetFont(@font_for_content)
app/views/issues/show.rfpdf (kopia robocza)
1 1
<%	pdf=IfpdfHelper::IFPDF.new(current_language)
2 2
	pdf.SetTitle("#{@project.name} - ##{@issue.tracker.name} #{@issue.id}")
3
	pdf.AliasNbPages
3
	pdf.alias_nb_pages
4 4
	pdf.footer_date = format_date(Date.today)
5 5
	pdf.AddPage
6 6
	
app/views/issues/index.rfpdf (kopia robocza)
1 1
<%	pdf=IfpdfHelper::IFPDF.new(current_language)
2 2
	title = @project ? "#{@project.name} - #{l(:label_issue_plural)}" : "#{l(:label_issue_plural)}"
3 3
	pdf.SetTitle(title)
4
	pdf.AliasNbPages
4
	pdf.alias_nb_pages
5 5
	pdf.footer_date = format_date(Date.today)
6 6
	pdf.AddPage("L")
7 7
	row_height = 7
......
47 47
   		pdf.SetY(pdf.GetY() + 1)
48 48
	end
49 49
%>
50
<%= pdf.Output %>
50
<%= pdf.Output %>
app/views/issues/gantt.rfpdf (kopia robocza)
1 1
<%
2 2
pdf=IfpdfHelper::IFPDF.new(current_language)
3 3
pdf.SetTitle("#{@project.name} - #{l(:label_gantt)}")
4
pdf.AliasNbPages
4
pdf.alias_nb_pages
5 5
pdf.footer_date = format_date(Date.today)
6 6
pdf.AddPage("L")
7 7
pdf.SetFontStyle('B',12)
......
185 185
pdf.Line(15, top, subject_width+g_width, top)
186 186

  
187 187
%>
188
<%= pdf.Output %>
188
<%= pdf.Output %>
(4-4/46)