Export to PDF works strange with russian symbols

Added by Aleksey Ryazhskih over 11 years ago

I faced with such problem:

Issue description card to PDF export result

russan symbols are rendered wrong in pdf.
How to resolve this problem?

redmine_pdf_bug.png - Issue description card to PDF export result (31.1 KB)

Replies (48)

RE: Export to PDF works strange with russian symbols - Added by Alex Aktion over 10 years ago

You are overestimate my skills man =) Im able only to install package from bitnamy =)

RE: Export to PDF works strange with russian symbols - Added by Mykhaylo Sorochan over 10 years ago

you need a paid support then :)

plugins are in {redmine install path}/vendor/plugins
remove rfpdf dir, and extract there the one from the link above, rename it to rfpdf
open {redmine install path}/lib/redmine/export/pdf.rb in text editor and do changes according to colors in patch

no warranties

RE: Export to PDF works strange with russian symbols - Added by Alexey Lustin over 10 years ago

well done
thanks, thanks, thanks
it is working fine for me

RE: Export to PDF works strange with russian symbols - Added by Dmitry K over 10 years ago

It doesn't work for me. Now it looks like the picture in attached file.

pdf_bug.png (23.6 KB)

RE: Export to PDF works strange with russian symbols - Added by Mykhaylo Sorochan over 10 years ago

Dmitry K,
OS version, Redmine version?

RE: Export to PDF works strange with russian symbols - Added by Dmitry K over 10 years ago

OS - Windows Server 2003 Enterprise SP2
Redmine 0.8.3, install package from bitnamy.

RE: Export to PDF works strange with russian symbols - Added by Dmitry K over 10 years ago

That's the first thing I've done, but it not works :(

RE: Export to PDF works strange with russian symbols - Added by Mykhaylo Sorochan over 10 years ago

I've just tested it on WinXP Rus with r2757. Works fine with the upper pdf.rb.patch and the following patch (from frolz.ya.ru) applied to vendor/plugins/rfpdf/lib/tcpdf.rb.

tcpdf.rb.patch Magnifier (299 Bytes)

RE: Export to PDF works strange with russian symbols - Added by Mykhaylo Sorochan over 10 years ago

Please report your experiences. If everything goes fine, we may reaise a request to include that into source tree. More feedbacks are welcome.

RE: Export to PDF works strange with russian symbols - Added by Dmitry K over 10 years ago

Yes, it works!!!!
Thank you very much for solving the proplem.
tcpdf.rb.patch was helpful for my problem.

So sequence for me to fix this bug is:
1. http://frolz.ya.ru/replies.xml?item_no=1135
2. tcpdf.rb.patch

RE: Export to PDF works strange with russian symbols - Added by Alexey Chepurnykh over 9 years ago

I tried to install the last version of redmine (Rev. 3606). The problem with the russian letters in pdf still exists. Before I fixed it in version 0.8. Is it possible to fix the error forever in the source repository?

RE: Export to PDF works strange with russian symbols - Added by Igor Isaenko over 9 years ago

Ican tell you more.
Russian language don't work even in redmine, running on redmine.org
http://www.redmine.org/issues/61.pdf

RE: Export to PDF works strange with russian symbols - Added by Aleksandar Pavic over 9 years ago

Same issue, using latin characters.

RE: Export to PDF works strange with russian symbols - Added by Nikolay Komarov about 9 years ago

Tried to follow instructions from http://frolz.ya.ru/replies.xml?item_no=1135 on my Redmine 1.0.1 server.
The strings specified are now all in the same file: redmine\lib\redmine\export\pdf.rb

If didn't work!
To everyone who has Russian language text generated without problems: if you will upgrade to 1.0+ version, please post how you patched it.

RE: Export to PDF works strange with russian symbols - Added by Nikolay Komarov about 9 years ago

Ooops, I just didn't update tcpdf.rb
After updating, it works! I believe these two patches should be applied to the standard distribution.

RE: Export to PDF works strange with russian symbols - Added by Dmitriy Jamaro almost 9 years ago

In version 1.1.0 this method does not help.
who knows how to beat this problem?

RE: Export to PDF works strange with russian symbols - Added by Sergey Kritsky almost 9 years ago

All works fine, you need additionally patch {REDMINE}/lib/redmine/helpers/gantt.rb - pdf.AliasNbPages to pdf.alias_nb_pages

RE: Export to PDF works strange with russian symbols - Added by Ivan Cenov over 8 years ago

Sergey Kritsky wrote:

All works fine, you need additionally patch {REDMINE}/lib/redmine/helpers/gantt.rb - pdf.AliasNbPages to pdf.alias_nb_pages

It really works. Thanks.

RE: Export to PDF works strange with russian symbols - Added by a k over 8 years ago

Ivan Cenov wrote:

It really works. Thanks.

but not for me
please, tell me which version your redmine?
I use 1.1.0 and a have a some error in ruby after applying the patch

NoMethodError (undefined method `[]' for nil:NilClass):
lib/redmine/export/pdf.rb:105:in `Cell'
lib/redmine/export/pdf.rb:112:in `Footer'
lib/redmine/export/pdf.rb:188:in `issues_to_pdf'
app/controllers/issues_controller.rb:95:in `index'
app/controllers/issues_controller.rb:90:in `index'
/usr/local/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/usr/local/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/usr/local/ruby/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/usr/local/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start'
/usr/local/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/usr/local/ruby/lib/ruby/1.8/webrick/server.rb:95:in `start'
/usr/local/ruby/lib/ruby/1.8/webrick/server.rb:92:in `each'
/usr/local/ruby/lib/ruby/1.8/webrick/server.rb:92:in `start'
/usr/local/ruby/lib/ruby/1.8/webrick/server.rb:23:in `start'
/usr/local/ruby/lib/ruby/1.8/webrick/server.rb:82:in `start'
Rendering /usr/local/redmine_test_pdf/public/500.html (500 Internal Server Error)

RE: Export to PDF works strange with russian symbols - Added by Ivan Cenov over 8 years ago

I use 1.1.0.
It worked with 1.0.4 and then stopped with 1.1.0. Then I did what Sergey Kritsky proposed and it restored working again.

Here you may see the original instructions how to do it, but prior 1.1.x : http://groups.google.com/group/redmine2ru/browse_thread/thread/1fa3f557643472bb

To get current with 1.1.x you have to make one more change:

Edit redmine\lib\redmine\helpers\gantt.rb (near line 515)
Change 'pdf.AliasNbPages ' to 'pdf.alias_nb_pages'
Important note: This change has to be done in Redmine 1.1.x+

RE: Export to PDF works strange with russian symbols - Added by a k over 8 years ago

Thanks Ivan. Now it works for me. However, it started working even before I finished changing all the files. And it started to work only when I completely replaced the rows instead of commenting them.

Now, after running redmine I get the following message:
/usr/local/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/mime_type.rb:80: warning: already initialized constant PDF
with which it can be connected and how it may affect the operation?

RE: Export to PDF works strange with russian symbols - Added by Ivan Cenov over 8 years ago

I remember I have seen this message (or similar one) about 'already initialized constant PDF' but I cannot recall where and when I have seen it.

1 2 (26-48/48)