Defect #10681

Export to Persian PDF problem

Added by m mahdi over 6 years ago. Updated over 3 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:PDF export
Target version:2.6.2
Resolution:Fixed Affected version:2.6.0

Description

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

utf8-pdf1.png (4.65 KB) m mahdi, 2012-04-16 16:41

utf8-pdf2.png (12.7 KB) m mahdi, 2012-04-16 16:41

error_gantt.png (14.7 KB) m mahdi, 2014-12-06 11:00

Persian_pdf.png (17.7 KB) Jun NAITOH, 2014-12-06 13:00

task_history.png (46.8 KB) m mahdi, 2014-12-06 14:02

Persian_pdf2.png (58.9 KB) Jun NAITOH, 2014-12-06 16:12

pdf_Arabic_Persian.patch Magnifier (602 Bytes) Jun NAITOH, 2014-12-06 16:12

pdf.rb_r13778.diff Magnifier (879 Bytes) Jun NAITOH, 2014-12-21 08:15

pdf.png (14 KB) Toshi MARUYAMA, 2015-01-04 13:52

web.png (21.6 KB) Toshi MARUYAMA, 2015-01-04 13:52

pdf.rb_r13857.patch Magnifier (1.25 KB) Jun NAITOH, 2015-01-10 07:19


Related issues

Related to Redmine - Defect #8753: PDF export for Hebrew is reversed Closed 2010-07-15
Related to Redmine - Defect #13575: Graphic characters not exported Closed
Related to Redmine - Defect #13781: CJK(Chinese/Japanese/Korean) characters are not shown in ... Closed
Related to Redmine - Defect #16040: problem in exporting Arabic text to csv Closed
Related to Redmine - Defect #18586: Arabic PDF Closed
Duplicated by Redmine - Defect #18504: PDF export for arabic and persian language doesn't work Closed

Associated revisions

Revision 13726
Added by Toshi MARUYAMA almost 4 years ago

Gemfile: update rbpdf version to 1.18.3 (#16040, #18586, #10681)

Revision 13729
Added by Toshi MARUYAMA almost 4 years ago

pdf: use DejaVuSans font in Arabic and Persian (#16040, #18586, #10681)

Revision 13976
Added by Toshi MARUYAMA over 3 years ago

pdf: remove styles of Arabic/Persian Italic and Thai Bold (#10681, #18586)

Contributed by Jun NAITOH.

Revision 13977
Added by Toshi MARUYAMA over 3 years ago

pdf: remove styles by fontname instated of Arabic/Persian/Thai locale (#10681, #18586)

Revision 13982
Added by Toshi MARUYAMA over 3 years ago

Merged r13729 from trunk to 2.6-stable (#16040, #18586, #10681)

pdf: use DejaVuSans font in Arabic and Persian.

Revision 13983
Added by Toshi MARUYAMA over 3 years ago

Merged r13976 from trunk to 2.6-stable (#10681, #18586)

pdf: remove styles of Arabic/Persian Italic and Thai Bold.

Contributed by Jun NAITOH.

Revision 13984
Added by Toshi MARUYAMA over 3 years ago

Merged r13977 from trunk to 2.6-stable (#10681, #18586)

pdf: remove styles by fontname instated of Arabic/Persian/Thai locale.

History

#1 Updated by Etienne Massip over 6 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?

#2 Updated by Toshi MARUYAMA over 6 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

#3 Updated by Toshi MARUYAMA over 6 years ago

See #8753.

#4 Updated by Toshi MARUYAMA over 4 years ago

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

#5 Updated by Toshi MARUYAMA almost 4 years ago

  • Duplicated by Defect #18504: PDF export for arabic and persian language doesn't work added

#6 Updated by Toshi MARUYAMA almost 4 years ago

  • Affected version changed from 1.3.1 to 2.6.0

#7 Updated by Jun NAITOH almost 4 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

#8 Updated by m mahdi almost 4 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.

#9 Updated by Jun NAITOH almost 4 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.

#10 Updated by m mahdi almost 4 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"

#11 Updated by Jun NAITOH almost 4 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

#12 Updated by Ebrahim Mohammadi almost 4 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.

#13 Updated by m mahdi almost 4 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.

#14 Updated by Ebrahim Mohammadi almost 4 years ago

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

#15 Updated by Jun NAITOH almost 4 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

#16 Updated by m mahdi almost 4 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.

#17 Updated by Jun NAITOH almost 4 years ago

m mahdi wrote:

Thanks Jun.
It was correct and works well.

Thank you very much for your confirmation!

#18 Updated by Toshi MARUYAMA almost 4 years ago

  • Target version set to 2.6.1

#19 Updated by Toshi MARUYAMA almost 4 years ago

  • File web.png added
  • File pdf.png added
  • Target version deleted (2.6.1)

Sorry, I cannot show italic correctly.

  • Ruby 1.8.7
  • Ruby 1.9.3
  • Ruby 2.1.5


#20 Updated by Toshi MARUYAMA almost 4 years ago

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

#21 Updated by Jun NAITOH almost 4 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.

#22 Updated by Toshi MARUYAMA over 3 years ago

#23 Updated by Toshi MARUYAMA over 3 years ago

  • Target version set to 2.6.2

#24 Updated by Toshi MARUYAMA over 3 years ago

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

Fixed in 2.6-stable r13984, thanks.

Also available in: Atom PDF