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
Long Website names are truncated in pdf based reports #9936
Comments
Thx for reporting this bug. You can select report format HTML but it won't be an attachment. |
Hello Thomas, thanks for quick awnsering. If you will fix this bug. How long do i have to wait until i will get a fixed version of piwik? Additionally i have a nother question concerning the html task. Is there an option to automate the download process of reports? I mean, in the gui there is a button download and there i will get a file including the html based report. Otherwise, this proofs that piwik can generate html file based reports, generally. Is there an option to apply a feature request to have email reports with attached html files instead of html content inside the mail body? Kind regards Lars |
@tsteur Want to take a stab at this (if no one is working on a fix now) if you suggest the best way at it |
I would say you'd want to have a look here: https://github.com/piwik/piwik/blob/2.16.0/core/ReportRenderer/Pdf.php#L358 and maybe here https://github.com/piwik/piwik/blob/2.16.0/core/ReportRenderer/Pdf.php#L372 . It seems to truncate after 55 characters see: https://github.com/piwik/piwik/blob/2.16.0/core/ReportRenderer/Pdf.php#L58 I'm not sure what best way to solve is as some people might like this behaviour. Maybe you have an idea? Eg we could have a config setting for it but ideally we try to avoid config settings. |
Thanks, taking a look. Is there a reason why we can't wrap to the next line when the name is longer than 55 characters? |
I had a quick look but am not really familiar with this part of the code. I think from what I understand it may truncates it to make sure it is always in one line as it maybe uses hard coded width and especially height see https://github.com/piwik/piwik/blob/2.16.0/core/ReportRenderer/Pdf.php#L379 where |
You're right, there could be some users who are happy with the truncation. So the solution is entirely up to you now for this case, whether we
|
@IhateHandles It would be ideal to not truncate the website name in PDF reports. if you manage to make it work and look good, it would be the best solution I think? |
@mattab Alright. I quickly experimented and got it working on mine (save for some padding issues). Basically what I did for label columns was to use the MultiCell method (which allows for text spanning more than one line) instead of Cell. I didn't go over TCPDF's docs (if they're available) so I'll do that sooner or later and see if we can have the fix in place. |
We have really long website titles in our web projekt and if we use the reporting as pdf file we got useless informations because we see only the beginning of our title.
And so the information we are interested in is absolutly missing.
Using the html export shows perfect matching columns with the full name. But here we have an other problem. We got the reports per mail only, and there the info is not attached as an extra html file, it is only a part of the body of the mail. But for automation purposes we need such an attached file as it is the case using pdf reports. Is there an option to configure piwik to send the report in html format as an mail attachement?
thanks in advance
lars
The text was updated successfully, but these errors were encountered: