@@ -246,6 +246,7 module Redmine | |||||
246 | options[:image].stroke_width(1) |
|
246 | options[:image].stroke_width(1) | |
247 | options[:image].text(options[:indent], options[:top] + 2, project.name) |
|
247 | options[:image].text(options[:indent], options[:top] + 2, project.name) | |
248 | when :pdf |
|
248 | when :pdf | |
|
249 | pdf_new_page?(options) | |||
249 | options[:pdf].SetY(options[:top]) |
|
250 | options[:pdf].SetY(options[:top]) | |
250 | options[:pdf].SetX(15) |
|
251 | options[:pdf].SetX(15) | |
251 |
|
252 | |||
@@ -381,6 +382,7 module Redmine | |||||
381 | options[:image].stroke_width(1) |
|
382 | options[:image].stroke_width(1) | |
382 | options[:image].text(options[:indent], options[:top] + 2, version.to_s_with_project) |
|
383 | options[:image].text(options[:indent], options[:top] + 2, version.to_s_with_project) | |
383 | when :pdf |
|
384 | when :pdf | |
|
385 | pdf_new_page?(options) | |||
384 | options[:pdf].SetY(options[:top]) |
|
386 | options[:pdf].SetY(options[:top]) | |
385 | options[:pdf].SetX(15) |
|
387 | options[:pdf].SetX(15) | |
386 |
|
388 | |||
@@ -535,6 +537,7 module Redmine | |||||
535 | options[:image].stroke_width(1) |
|
537 | options[:image].stroke_width(1) | |
536 | options[:image].text(options[:indent], options[:top] + 2, issue.subject) |
|
538 | options[:image].text(options[:indent], options[:top] + 2, issue.subject) | |
537 | when :pdf |
|
539 | when :pdf | |
|
540 | pdf_new_page?(options) | |||
538 | options[:pdf].SetY(options[:top]) |
|
541 | options[:pdf].SetY(options[:top]) | |
539 | options[:pdf].SetX(15) |
|
542 | options[:pdf].SetX(15) | |
540 |
|
543 | |||
@@ -921,7 +924,7 module Redmine | |||||
921 | :g_width => g_width, |
|
924 | :g_width => g_width, | |
922 | :indent => 0, |
|
925 | :indent => 0, | |
923 | :indent_increment => 5, |
|
926 | :indent_increment => 5, | |
924 |
:top_increment => |
|
927 | :top_increment => 5, | |
925 | :format => :pdf, |
|
928 | :format => :pdf, | |
926 | :pdf => pdf |
|
929 | :pdf => pdf | |
927 | } |
|
930 | } | |
@@ -943,6 +946,15 module Redmine | |||||
943 | cmp |
|
946 | cmp | |
944 | end |
|
947 | end | |
945 | end |
|
948 | end | |
|
949 | ||||
|
950 | def pdf_new_page?(options) | |||
|
951 | if options[:top] > 180 | |||
|
952 | options[:pdf].Line(15, options[:top], PDF::TotalWidth, options[:top]) | |||
|
953 | options[:pdf].AddPage("L") | |||
|
954 | options[:top] = 15 | |||
|
955 | options[:pdf].Line(15, options[:top] - 0.1, PDF::TotalWidth, options[:top] - 0.1) | |||
|
956 | end | |||
|
957 | end | |||
946 | end |
|
958 | end | |
947 | end |
|
959 | end | |
948 | end |
|
960 | end |
General Comments 0
You need to be logged in to leave comments.
Login now