fix for #8973: Export feature(to csv/pdf) doesn't work in Japanese

csv and pdf encoding are know defined for each language (general_csv_encoding and general_pdf_encoding keys in lang files)
added SJIS font for japanese pdf exports

git-svn-id: http://redmine.rubyforge.org/svn/trunk@287 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2007-03-01 19:49:04 +00:00
parent 83c96d4f3e
commit 6a875eb691
12 changed files with 92 additions and 65 deletions
+4 -4
View File
@@ -1,4 +1,4 @@
<% pdf=IfpdfHelper::IFPDF.new
<% pdf=IfpdfHelper::IFPDF.new(current_language)
pdf.SetTitle("#{@project.name} - #{l(:label_issue_plural)}")
pdf.AliasNbPages
pdf.footer_date = format_date(Date.today)
@@ -8,14 +8,14 @@
#
# title
#
pdf.SetFont('Arial','B',11)
pdf.SetFontStyle('B',11)
pdf.Cell(190,10, "#{@project.name} - #{l(:label_issue_plural)}")
pdf.Ln
#
# headers
#
pdf.SetFont('Arial','B',10)
pdf.SetFontStyle('B',10)
pdf.SetFillColor(230, 230, 230)
pdf.Cell(15, row_height, "#", 0, 0, 'L', 1)
pdf.Cell(30, row_height, l(:field_tracker), 0, 0, 'L', 1)
@@ -32,7 +32,7 @@
#
# rows
#
pdf.SetFont('Arial','',9)
pdf.SetFontStyle('',9)
pdf.SetFillColor(255, 255, 255)
@issues.each do |issue|
pdf.Cell(15, row_height, issue.id.to_s, 0, 0, 'L', 1)
+5 -5
View File
@@ -1,14 +1,14 @@
<%
pdf=IfpdfHelper::IFPDF.new
pdf=IfpdfHelper::IFPDF.new(current_language)
pdf.SetTitle("#{@project.name} - #{l(:label_gantt)}")
pdf.AliasNbPages
pdf.footer_date = format_date(Date.today)
pdf.AddPage("L")
pdf.SetFont('Arial','B',12)
pdf.SetFontStyle('B',12)
pdf.SetX(15)
pdf.Cell(70, 20, @project.name)
pdf.Ln
pdf.SetFont('Arial','B',9)
pdf.SetFontStyle('B',9)
subject_width = 70
header_heigth = 5
@@ -84,7 +84,7 @@ if show_days
left = subject_width
height = header_heigth
wday = @date_from.cwday
pdf.SetFont('Arial','B',7)
pdf.SetFontStyle('B',7)
(@date_to - @date_from + 1).to_i.times do
width = zoom
pdf.SetY(y_start + 2 * header_heigth)
@@ -105,7 +105,7 @@ pdf.Cell(subject_width+g_width-15, headers_heigth, "", 1)
# Tasks
#
top = headers_heigth + y_start
pdf.SetFont('Arial','B',7)
pdf.SetFontStyle('B',7)
@issues.each do |i|
pdf.SetY(top)
pdf.SetX(15)