Index: app/controllers/wiki_controller.rb =================================================================== --- app/controllers/wiki_controller.rb (revision 7698) +++ app/controllers/wiki_controller.rb (working copy) @@ -40,6 +40,7 @@ helper :attachments include AttachmentsHelper helper :watchers + include Redmine::Export::PDF # List of pages, sorted alphabetically and by parent (hierarchy) def index @@ -71,7 +72,10 @@ end @content = @page.content_for_version(params[:version]) if User.current.allowed_to?(:export_wiki_pages, @project) - if params[:format] == 'html' + if params[:format] == 'pdf' + send_data(wiki_to_pdf(@page, @project), :type => 'application/pdf', :filename => "#{@page.title}.pdf") + return + elsif params[:format] == 'html' export = render_to_string :action => 'export', :layout => false send_data(export, :type => 'text/html', :filename => "#{@page.title}.html") return Index: app/views/wiki/show.html.erb =================================================================== --- app/views/wiki/show.html.erb (revision 7698) +++ app/views/wiki/show.html.erb (working copy) @@ -53,6 +53,7 @@ <% end %> <% other_formats_links do |f| %> + <%= f.link_to 'PDF', :url => {:id => @page.title, :version => @content.version} %> <%= f.link_to 'HTML', :url => {:id => @page.title, :version => @content.version} %> <%= f.link_to 'TXT', :url => {:id => @page.title, :version => @content.version} %> <% end if User.current.allowed_to?(:export_wiki_pages, @project) %>