Pluggable PDF export engine
Redmine could support multiple PDF export engines provided in form of redmine plugins.
Administrator could choose different PDF export engines for different projects or system-wide. The main alternative to the currently used PDF export is a wrapper around wkhtmltopdf - redmine_pdf_wiki plugin. wkthmltopdf is a PDF renderer that uses an internal qt webkit browser to display provided HTML and to save it to PDF so it looks exactly as the original HTML.
I recently fixed redmine_pdf_wiki to work with Redmine 2.x and to replace standard PDF export (monkey patched wiki_page_to_pdf). I noticed that RFPDF is a plugin and it is already carefully facaded with Redmine::Export::PDF. I think it is relatively easy to support an external PDF export plugin.
Current approach is to issue PDF instructions from a ruby code. It is lightweight and safe solution but when heavy and highly accurate PDFs are needed it could be better to use wkhtmltopdf. It is a native program with several major issues but I hope they will be fixed in future.
Please check an initial discussion with Terence Miller in pull request
#1 Updated by Terence Mill over 4 years ago
There are plugin which tried to work around this problem but are outdated or imcompatible.
Hower this a protypes of possible solution for this issue.
#3 Updated by Ebrahim Mohammadi over 3 years ago
Now that RFPDF is dead and its author is using Prawn, it seems the logical way of fixing many issues with PDF export (such as #10681, #13781 and #8753) is to migrate to a better, alive PDF rendering engine, maybe Prawn.
This is a grave issue, because is some locales such as Persian (and probably Arabic and Hebrew) the exported PDF is totally garbage and of no use.
#6 Updated by Jun NAITOH over 3 years ago
I updated rfpdf base version to TCPDF 5.1.002 from 1.53.0.TC031.
- RTL (Right-To-Left) languages support was added.
- HTML support improved.
Toshi MARUYAMA wrote:
I want to define rfpdf gem in Gemfile and remove sources from Redmine.
I would like to create rfpdf gem at the end of next month, and to send the PDF patch of Redmine.