summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-11-24 11:12:00 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-11-24 11:12:00 +0000
commitb200fcfdae3cd80d5829d1539a20d616b4ae4e71 (patch)
treeb88117ab972330b359bd0e18016418f88f42e31a /lib
parent81bbb8f9b8554e99e603a9f79b3c921af285b2e3 (diff)
downloadredmine-b200fcfdae3cd80d5829d1539a20d616b4ae4e71.tar.gz
redmine-b200fcfdae3cd80d5829d1539a20d616b4ae4e71.zip
pdf: add the new feature to include attachment images (#3261)
Contributed by Jun NAITOH. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7915 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r--lib/redmine/export/pdf.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/redmine/export/pdf.rb b/lib/redmine/export/pdf.rb
index 661b4454a..b09f9b60d 100644
--- a/lib/redmine/export/pdf.rb
+++ b/lib/redmine/export/pdf.rb
@@ -116,12 +116,23 @@ module Redmine
end
def RDMwriteHTMLCell(w, h, x, y, txt='', attachments=[], border=0, ln=1, fill=0)
+ @attachments = attachments
writeHTMLCell(w, h, x, y,
fix_text_encoding(
Redmine::WikiFormatting.to_html(Setting.text_formatting, txt)),
border, ln, fill)
end
+ def getImageFilename(attrname)
+ # attrname: general_pdf_encoding string file/uri name
+ atta = RDMPdfEncoding.attach(@attachments, attrname, l(:general_pdf_encoding))
+ if atta
+ return atta.diskfile
+ else
+ return nil
+ end
+ end
+
def Footer
SetFont(@font_for_footer, 'I', 8)
SetY(-15)