View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
05039 | Bug reports | Other | public | 2011-03-17 18:40 | 2011-04-11 11:30 |
Reporter | dionet | Assigned To | c_schmitz | ||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Fixed in Version | 1.91RC6 | ||||
Summary | 05039: Malformed PDF and XLS when exporting statistics | ||||
Description | When you export a statistics report as a PDF or XLS file, the resulting files are broken. Although I didn't have any problem opening these files, there may be situations they don't work properly. | ||||
Steps To Reproduce | Open Administration Panel; Open the file with an hex or text editor and look for html code at the bottom. | ||||
Tags | No tags attached. | ||||
Attached Files | statisticsfix.diff (559 bytes)
Index: admin/statistics.php =================================================================== --- admin/statistics.php (revision 9890) +++ admin/statistics.php (working copy) @@ -1621,9 +1621,11 @@ break; case 'pdf': generate_statistics($surveyid,$summary,$summary,$usegraph,$outputType,'I',$statlang); + exit; break; case 'xls': generate_statistics($surveyid,$summary,$summary,$usegraph,$outputType,'DD',$statlang); + exit; break; default: | ||||
Bug heat | 6 | ||||
Complete LimeSurvey version number (& build) | 9890 | ||||
I will donate to the project if issue is resolved | |||||
Browser | |||||
Database type & version | |||||
Server OS (if known) | |||||
Webserver software & version (if known) | |||||
PHP Version | |||||
Can you explain "the files are broken" in more detail? What's wrong if you can open these files? |
|
When you export a PDF or an Excel file, the script doesn't end after the file is generated. That means it also outputs the export statistics page html. So the resulting files have unnecessary html in the bottom. The files can still be opened, but they aren't valid. I tried to validate an exported PDF before applying the patch but it returned this warning "There is data after the EOF marker." (at the 3-Heights PDF Validator Online Tool). Applying this patch fixes the problem and results in smaller files. |
|
Carsten, can you please have a look at this issue and the attached patch... |
|
Thank you! |
|
1.91RC6 released. |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2011-03-17 18:40 | dionet | New Issue | |
2011-03-17 18:40 | dionet | File Added: statisticsfix.diff | |
2011-03-21 00:40 | Mazi | Note Added: 14484 | |
2011-03-21 00:40 | Mazi | Assigned To | => Mazi |
2011-03-21 00:40 | Mazi | Status | new => feedback |
2011-03-21 01:25 | dionet | Note Added: 14492 | |
2011-03-21 01:25 | dionet | Status | feedback => assigned |
2011-03-22 16:22 | Mazi | Assigned To | Mazi => c_schmitz |
2011-03-22 16:23 | Mazi | Note Added: 14509 | |
2011-03-23 23:11 | c_schmitz | Note Added: 14529 | |
2011-03-23 23:11 | c_schmitz | Status | assigned => resolved |
2011-03-23 23:11 | c_schmitz | Fixed in Version | => 1.91RC6 |
2011-03-23 23:11 | c_schmitz | Resolution | open => fixed |
2011-03-23 23:11 | c_schmitz | Project | @2@ => Bug reports |
2011-04-11 11:30 | c_schmitz | Note Added: 14763 | |
2011-04-11 11:30 | c_schmitz | Status | resolved => closed |
2021-03-08 20:08 | c_schmitz | Category | Statistics => (No Category) |