matomo-org / matomo

Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
https://matomo.org/
GNU General Public License v3.0
19.86k stars 2.65k forks source link

PDF reports: do not truncate, wrap instead #7331

Open ArnY opened 9 years ago

ArnY commented 9 years ago

In PDF reports, lines in report tables should never be truncated but wrapped instead.

One of my users got the following report by mail:

github-truncated

By using MultiCell instead of Cell in the PDF renderer the user would have gotten this instead:

github-wrapped

Commit 9a324337c1cba8ca5fc2d708cf22f310735e2e54 does the trick but needs testing...

mattab commented 9 years ago

Hi @ArnY thanks for the suggestion. I'm not sure whether we want to make this change. Instead maybe it would be better to make the table smart and display only the text that is different for each row. For example here each row starts with "Universite de Nantes - Les journees scientifiques - XYZ" - Piwik could detect that and replace these labels with " ... XYZ " (replace the repeated text with ...)

ArnY commented 9 years ago

Hrm, indeed, that could be another way, but how would you manage to display the first line? Even if the prefix can be substituted by '...' after the first line, it should sitll be be displayed on the first one which is also too long.

ArnY commented 9 years ago

That wouldn't work either if all titles are longer than 55 characters without any common prefix or with a prefix (for example "Université de Nantes") but still longer than 55 chars.