Project

General

Profile

Actions

Defect #10681

closed

Export to Persian PDF problem

Added by m mahdi over 12 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
PDF export
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

If issues language be fa-IR, exported PDF is like as attached files.


Files

utf8-pdf1.png (4.65 KB) utf8-pdf1.png m mahdi, 2012-04-16 16:41
utf8-pdf2.png (12.7 KB) utf8-pdf2.png m mahdi, 2012-04-16 16:41
error_gantt.png (14.7 KB) error_gantt.png m mahdi, 2014-12-06 11:00
Persian_pdf.png (17.7 KB) Persian_pdf.png Jun NAITOH, 2014-12-06 13:00
task_history.png (46.8 KB) task_history.png m mahdi, 2014-12-06 14:02
Persian_pdf2.png (58.9 KB) Persian_pdf2.png Jun NAITOH, 2014-12-06 16:12
pdf_Arabic_Persian.patch (602 Bytes) pdf_Arabic_Persian.patch Jun NAITOH, 2014-12-06 16:12
pdf.rb_r13778.diff (879 Bytes) pdf.rb_r13778.diff Jun NAITOH, 2014-12-21 08:15
pdf.png (14 KB) pdf.png Toshi MARUYAMA, 2015-01-04 13:52
web.png (21.6 KB) web.png Toshi MARUYAMA, 2015-01-04 13:52
pdf.rb_r13857.patch (1.25 KB) pdf.rb_r13857.patch Jun NAITOH, 2015-01-10 07:19

Related issues

Related to Redmine - Defect #8753: PDF export for Hebrew is reversedClosed2010-07-15

Actions
Related to Redmine - Defect #13575: Graphic characters not exportedClosed

Actions
Related to Redmine - Defect #13781: CJK(Chinese/Japanese/Korean) characters are not shown in PDF on non CJK localesClosed

Actions
Related to Redmine - Defect #16040: problem in exporting Arabic text to csvClosed

Actions
Related to Redmine - Defect #18586: Arabic PDFClosed

Actions
Has duplicate Redmine - Defect #18504: PDF export for arabic and persian language doesn't workClosed

Actions
Actions #1

Updated by Etienne Massip over 12 years ago

There has been some PDF export improvements with 1.4.0, maybe you should give it a try on http://demo.redmine.org or http://m.redmine.org?

Actions #2

Updated by Toshi MARUYAMA over 12 years ago

  • Subject changed from Export to PDF in utf8 issues problem to Export to Persian PDF problem
  • Category changed from I18n to PDF export
Actions #3

Updated by Toshi MARUYAMA over 12 years ago

See #8753.

Actions #4

Updated by Toshi MARUYAMA over 10 years ago

  • Related to Defect #16040: problem in exporting Arabic text to csv added
Actions #5

Updated by Toshi MARUYAMA over 9 years ago

  • Has duplicate Defect #18504: PDF export for arabic and persian language doesn't work added
Actions #6

Updated by Toshi MARUYAMA over 9 years ago

  • Affected version changed from 1.3.1 to 2.6.0
Actions #7

Updated by Jun NAITOH over 9 years ago

I released rbpdf 1.18.3 gem.
Persian support was fixed by rbpdf 1.18.3.
please use DejaVuSans font.

  1. please bundle update
    bundle update rbpdf
    
  2. set DejaVuSans font.
    • config/locales/fa.yml
      general_pdf_fontname: DejaVuSans
      
  3. use Persian locale
Actions #8

Updated by m mahdi over 9 years ago

I update rbpdf to 1.18.3
I changed general_pdf_fontname to "DejaVuSans"
I used Persian locale (fa_IR.UTF-8)
but, I get same error.

Actions #9

Updated by Jun NAITOH over 9 years ago

m mahdi wrote:

I update rbpdf to 1.18.3
I changed general_pdf_fontname to "DejaVuSans"
I used Persian locale (fa_IR.UTF-8)
but, I get same error.

Sorry, additional procedure.
Please restart Redmine.

  • result

Persian is a locale in RTL.
But, you seem to be using a locale in LTR.

Actions #10

Updated by m mahdi over 9 years ago

Thanks for your reply.
After restart Redmine, PDF export was correct.
But, task history is incorrect yet.

Also the "DejaVuSans" font is not appropriate for Persian and Arabic language. Please change font to Arial, Tahoma or "times new roman"

Actions #11

Updated by Jun NAITOH over 9 years ago

DejaVuSans Arabic and Persian language weren't supported by Italic font.

Please use pdf_Arabic_Persian.patch. (for Remine 2.6 and trunk)

  • result
Actions #12

Updated by Ebrahim Mohammadi over 9 years ago

m mahdi wrote:

After restart Redmine, PDF export was correct.

No, the exported PDF is not correct yet despite the improvement. The problem is all characters are joined to their previous characters, even when they must not be joined.

Actions #13

Updated by m mahdi over 9 years ago

Ebrahim Mohammadi wrote:

No, the exported PDF is not correct yet despite the improvement. The problem is all characters are joined to their previous characters, even when they must not be joined.

Yes, The font is not correct. The font not suitable for Persian and Arabic text.

Actions #14

Updated by Ebrahim Mohammadi over 9 years ago

I'm not sure font is the problem. DejaVu fonts work well with Persian. I think something else is wrong.

Actions #15

Updated by Jun NAITOH over 9 years ago

Ebrahim Mohammadi wrote:

I'm not sure font is the problem. DejaVu fonts work well with Persian.

Yes, I think so, too.

I think something else is wrong.

I released rbpdf 1.18.4 gem.
I fixed many Arabic and Persian PDF export's problem by rbpdf 1.18.4.

  1. please bundle update
    bundle update rbpdf
    
  2. set DejaVuSans font.
    • config/locales/fa.yml
      general_pdf_fontname: DejaVuSans
      
    • config/locales/ar.yml
      general_pdf_fontname: DejaVuSans
      
  3. Please use pdf.rb_r13778.diff patch. (for Remine 2.6 and trunk)
  4. Please restart Redmine.
  5. Please use Arabic or Persian locale
  6. Please export PDF
Actions #16

Updated by m mahdi over 9 years ago

Jun NAITOH wrote:

Ebrahim Mohammadi wrote:

I'm not sure font is the problem. DejaVu fonts work well with Persian.

Yes, I think so, too.

I think something else is wrong.

I released rbpdf 1.18.4 gem.
I fixed many Arabic and Persian PDF export's problem by rbpdf 1.18.4.

  1. please bundle update
    [...]
  2. set DejaVuSans font.
    • config/locales/fa.yml
      [...]
    • config/locales/ar.yml
      [...]
  3. Please use pdf.rb_r13778.diff patch. (for Remine 2.6 and trunk)
  4. Please restart Redmine.
  5. Please use Arabic or Persian locale
  6. Please export PDF

Thanks Jun.
It was correct and works well.

Actions #17

Updated by Jun NAITOH over 9 years ago

m mahdi wrote:

Thanks Jun.
It was correct and works well.

Thank you very much for your confirmation!

Actions #18

Updated by Toshi MARUYAMA over 9 years ago

  • Target version set to 2.6.1
Actions #19

Updated by Toshi MARUYAMA over 9 years ago

Sorry, I cannot show italic correctly.

  • Ruby 1.8.7
  • Ruby 1.9.3
  • Ruby 2.1.5


Actions #20

Updated by Toshi MARUYAMA over 9 years ago

Previous note is on 2.6-stable r13840 applying note 15.

Actions #21

Updated by Jun NAITOH over 9 years ago

Toshi MARUYAMA wrote:

Sorry, I cannot show italic correctly.

Sorry, pdf.rb_r13778.diff has problem.
DejaVuSans Arabic and Persian language weren't supported by Italic font.

I fixed so as not to use an italic style by pdf.rb_r13857.patch.

Actions #22

Updated by Toshi MARUYAMA over 9 years ago

Actions #23

Updated by Toshi MARUYAMA over 9 years ago

  • Target version set to 2.6.2
Actions #24

Updated by Toshi MARUYAMA over 9 years ago

  • Status changed from New to Closed
  • Resolution set to Fixed

Fixed in 2.6-stable r13984, thanks.

Actions

Also available in: Atom PDF