Patch #2697 » redmine-0.8-kirilica.patch
| lib/redmine/export/pdf.rb (working copy) | ||
|---|---|---|
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||
|
require 'iconv'
|
||
|
require 'rfpdf/chinese'
|
||
|
require 'fpdf/chinese'
|
||
|
module Redmine
|
||
|
module Export
|
||
|
module PDF
|
||
|
class IFPDF < FPDF
|
||
|
class IFPDF < TCPDF
|
||
|
include GLoc
|
||
|
attr_accessor :footer_date
|
||
|
|
||
| ... | ... | |
|
@font_for_content = 'Big5'
|
||
|
@font_for_footer = 'Big5'
|
||
|
else
|
||
|
@font_for_content = 'Arial'
|
||
|
@font_for_footer = 'Helvetica'
|
||
|
@font_for_content = 'FreeSans'
|
||
|
@font_for_footer = 'FreeSans'
|
||
|
end
|
||
|
SetCreator(Redmine::Info.app_name)
|
||
|
SetFont(@font_for_content)
|
||
| ... | ... | |
|
pdf = IFPDF.new(current_language)
|
||
|
title = project ? "#{project} - #{l(:label_issue_plural)}" : "#{l(:label_issue_plural)}"
|
||
|
pdf.SetTitle(title)
|
||
|
pdf.AliasNbPages
|
||
|
pdf.alias_nb_pages
|
||
|
pdf.footer_date = format_date(Date.today)
|
||
|
pdf.AddPage("L")
|
||
|
row_height = 7
|
||
| ... | ... | |
|
def issue_to_pdf(issue)
|
||
|
pdf = IFPDF.new(current_language)
|
||
|
pdf.SetTitle("#{issue.project} - ##{issue.tracker} #{issue.id}")
|
||
|
pdf.AliasNbPages
|
||
|
pdf.alias_nb_pages
|
||
|
pdf.footer_date = format_date(Date.today)
|
||
|
pdf.AddPage
|
||
|
|
||
| ... | ... | |
|
def gantt_to_pdf(gantt, project)
|
||
|
pdf = IFPDF.new(current_language)
|
||
|
pdf.SetTitle("#{l(:label_gantt)} #{project}")
|
||
|
pdf.AliasNbPages
|
||
|
pdf.alias_nb_pages
|
||
|
pdf.footer_date = format_date(Date.today)
|
||
|
pdf.AddPage("L")
|
||
|
pdf.SetFontStyle('B',12)
|
||
- « Previous
- 1
- 2
- 3
- 4
- Next »