Defect #61 » 61.patch
| app/helpers/ifpdf_helper.rb (kopia robocza) | ||
|---|---|---|
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||
|
require 'iconv'
|
||
|
require 'rfpdf/chinese'
|
||
|
require 'fpdf/chinese'
|
||
|
module IfpdfHelper
|
||
|
|
||
|
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)
|
||
| app/views/issues/show.rfpdf (kopia robocza) | ||
|---|---|---|
|
<% pdf=IfpdfHelper::IFPDF.new(current_language)
|
||
|
pdf.SetTitle("#{@project.name} - ##{@issue.tracker.name} #{@issue.id}")
|
||
|
pdf.AliasNbPages
|
||
|
pdf.alias_nb_pages
|
||
|
pdf.footer_date = format_date(Date.today)
|
||
|
pdf.AddPage
|
||
|
|
||
| app/views/issues/index.rfpdf (kopia robocza) | ||
|---|---|---|
|
<% pdf=IfpdfHelper::IFPDF.new(current_language)
|
||
|
title = @project ? "#{@project.name} - #{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
|
||
| ... | ... | |
|
pdf.SetY(pdf.GetY() + 1)
|
||
|
end
|
||
|
%>
|
||
|
<%= pdf.Output %>
|
||
|
<%= pdf.Output %>
|
||
| app/views/issues/gantt.rfpdf (kopia robocza) | ||
|---|---|---|
|
<%
|
||
|
pdf=IfpdfHelper::IFPDF.new(current_language)
|
||
|
pdf.SetTitle("#{@project.name} - #{l(:label_gantt)}")
|
||
|
pdf.AliasNbPages
|
||
|
pdf.alias_nb_pages
|
||
|
pdf.footer_date = format_date(Date.today)
|
||
|
pdf.AddPage("L")
|
||
|
pdf.SetFontStyle('B',12)
|
||
| ... | ... | |
|
pdf.Line(15, top, subject_width+g_width, top)
|
||
|
|
||
|
%>
|
||
|
<%= pdf.Output %>
|
||
|
<%= pdf.Output %>
|
||