Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDF of Donations and Income reports not support for various currencies #2152

Closed
2 tasks
jaydeeprami opened this issue Sep 29, 2017 · 4 comments
Closed
2 tasks
Assignees
Milestone

Comments

@jaydeeprami
Copy link
Contributor

jaydeeprami commented Sep 29, 2017

Issue Overview

When we Download a PDF of Donations and Income reports for the various currency then it's not output properly.

Expected Behavior

  • It should display currency properly for all currencies.

Current Behavior

  • Currently, It does not display output for few currencies like below:
  • INR (Indian Rupee)
  • Pound etc.

Issue Screenshot

  1. When INR Currency:

inr

  1. When Pounds Sterling (£),

screenshot--2017-09-29-16-39-36-603

Possible Solution

  • We are using FPDF for generating PDF and used 'Helvetica' font. so that font not supported.
  • For solution used 'dejavusans' font to support all currencies.
  • For 'Iranian Rial', use 'CODE2000' font to support it.

Steps to Reproduce (for bugs)

  1. Go to Tools > Export > Click on Generate PDF (When Currency selected as USD it's work)
  2. Go to Tools > Export > Click on Generate PDF (When Currency selected as INR it's not work)
  3. Go to Tools > Export > Click on Generate PDF (When Currency selected as £ it does not display proper currency output)

@ravinderk, Do you want me to fix it and send PR?

Todos

  • Tests
  • Documentation
@DevinWalker DevinWalker added this to the 1.8.14 milestone Sep 29, 2017
@jaydeeprami
Copy link
Contributor Author

jaydeeprami commented Oct 2, 2017

@DevinWalker, I have tried all the possible solution to achieve it but it does not work because of encoding not work for the font in FPDF.

I have tried all the below encoding to work currency proper:
http://www.fpdf.org/en/tutorial/tuto7.htm

I have also tried 'Dejavusans' with different encoding method by below link and load that font but it also not works:

http://www.fpdf.org/makefont/

I think We need to use different PDF library like TCPDF for the same. Do I start it with TCPDF?
Please let me know your thoughts for the same.

Thanks,

@DevinWalker
Copy link
Member

@jaydeeprami yes that may be the best option as of right now. Let's move forward with removing fpdf and implementing tcpdf in core. Then we can move on and use the core library within PDF Receipts and Tributes, etc.

@jaydeeprami
Copy link
Contributor Author

Thanks @DevinWalker, I will move forward with implement TCPDF in the core.

jaydeeprami pushed a commit to jaydeeprami/Give that referenced this issue Oct 3, 2017
jaydeeprami pushed a commit to jaydeeprami/Give that referenced this issue Oct 3, 2017
jaydeeprami pushed a commit to jaydeeprami/Give that referenced this issue Oct 3, 2017
jaydeeprami pushed a commit to jaydeeprami/Give that referenced this issue Oct 3, 2017
jaydeeprami pushed a commit to jaydeeprami/Give that referenced this issue Oct 3, 2017
jaydeeprami pushed a commit to jaydeeprami/Give that referenced this issue Oct 3, 2017
@jaydeeprami jaydeeprami mentioned this issue Oct 3, 2017
3 tasks
jaydeeprami added a commit to jaydeeprami/Give that referenced this issue Oct 3, 2017
jaydeeprami added a commit to jaydeeprami/Give that referenced this issue Oct 3, 2017
jaydeeprami pushed a commit to jaydeeprami/Give that referenced this issue Oct 4, 2017
jaydeeprami pushed a commit to jaydeeprami/Give that referenced this issue Oct 10, 2017
jaydeeprami pushed a commit to jaydeeprami/Give that referenced this issue Oct 10, 2017
@ravinderk ravinderk modified the milestones: 1.8.14, 1.8.15 Oct 12, 2017
DevinWalker pushed a commit that referenced this issue Oct 13, 2017
@DevinWalker DevinWalker modified the milestones: 1.8.15, 1.8.14 Oct 13, 2017
@DevinWalker
Copy link
Member

Useful issues that describes which fonts work for which languages: matomo-org/matomo-package#33

This issue isn't yet resolve but I'm closing this due to the need to revamp this report in the future.

DevinWalker added a commit that referenced this issue Oct 13, 2017
* master: (32 commits)
  Removed unnceccessary fonts
  Standardize russian ruple symbol to ₽
  Removing unncessary font bloat from TCPDF
  Fixed up styling related to #2141 after merging 1.8.15 into 1.8.14
  removed unnecc spacing
  1. Renamed file to use hyphen naming convension 2. Added check for file exists within unit tests
  Added additional message to Akismet spam option
  Ran gulp build
  Added missing space
  Fixed incorrect version numbers from merging 1.8.15 into 1.8.14 for release
  Added a change log for 1.8.14
  Fixed incorrect version number
  Simplify if condition
  Update code docs
  Exported pdf file should be download by default
  Use give_prive_range fx to output price range
  Update give_price_range
  match font-color for iranian rial and russian ribble currency #2152
  always output graph on a new page #2152
  Fixed column width issue when category and tag both enabled #2152
  ...

# Conflicts:
#	assets/js/admin/admin-scripts.min.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants