Dependency Graph

Dependency Graph
related to related to child of child of duplicate of duplicate of

View Issue Details

IDProjectCategoryView StatusLast Update
14353Bug reportsPrint Viewpublic2020-06-27 16:52
ReporterDenisChenu Assigned Tocdorin  
PrioritynoneSeverityminor 
Status assignedResolutionopen 
Product Version3.15.x 
Summary14353: Print answers as PDF make to wide part
Description

When printing asnwers as PDF : we have really big white space …

Steps To Reproduce

Import included survey, print, export as pdf

Additional Information

usage of float in tcPDF : didn't work
even display:inline seems not work

Then each element are shown in block …

To show it better : you can test with some included style : see template uploaded

About fixing it by own template : yes, can be done … but really : want core offer a really broken pdf ? And a lot of twig file to update (that are not accessible via GUI)

TagsNo tags attached.
Complete LimeSurvey version number (& build)3.15.5 github
I will donate to the project if issue is resolvedNo
Browsernot relevant
Database & DB-Versionnot relevant
Server OS (if known)not relevant
Webserver software & version (if known)not relevant
PHP Versionnot relevant

Relationships

has duplicate 16435 new Bug reports Print answers : The display format should be proper and user friendly 
related to 14297 assignedcdorin Feature requests Missing setting to turn off showing answer/question codes at print answers overview 
related to 14430 assignedcdorin Bug reports Usage of obsolete HTML 
related to 14520 assignededdylackmann Bug reports Lots of styles for "print answers" view are hardcoded within Twig files which makes adjusting the page design pretty difficult 
related to 15389 closeddominikvitt Bug reports Line breaks at question text get lots at "print answers" overview 

Activities

DenisChenu

DenisChenu

2018-12-17 12:28

developer  

pdfIssues_vanilla.zip (112,878 bytes)
DenisChenu

DenisChenu

2019-02-12 14:58

developer   ~50521

Alternative : move to mpdf : https://gitlab.com/SondagesPro/coreAndTools/limeMpdf/blob/master/views/subviews/mpdf/style-bootstrap.twig

DenisChenu

DenisChenu

2019-02-12 15:04

developer   ~50522

My point of view:

  1. Maybe it's better to use boostrap class ?
  2. if we don't move to mpdf : Must remove usage of col-sm-X : since tcpdf is not compatible with float : https://bugs.limesurvey.org/view.php?id=14353
  3. Review all question to see if we have all information needed (see other for list with comment)
Mazi

Mazi

2019-03-11 16:14

partner   ~50905

From my point of view we should keep the current PDF library but need to adjust the design so things get styled properly. Tis should be fixed at version 3.x.

DenisChenu

DenisChenu

2019-03-11 16:46

developer   ~50909

Then : need to move to table/tr/td since tcpdf dodn't know float :)

Mazi

Mazi

2019-08-28 09:27

partner   ~53318

@DenisChenu, that's exactly what I did at my project to remove all that additioanl margin/padding caused by the default question containers at the PDF:
<groupsection class="groupSection">
<div class="row">
<div class="col-xs-12">
<h3>{{group.group_name}}</h3>
</div>
</div>
<div class="row">
<div class="container-fluid col-xs-11 col-md-10 col-xs-offset-1 col-md-offset-2">
{% for questionId,question in group.answerArray %}
{% set questionTemplate = './subviews/printanswers/questiontypes/template' ~ question.questionclass ~ '.twig' %}
{% if (aSurveyInfo.printPdf == 1) %}
<table width="100%" class="pdftable" style="padding: 5px; page-break-inside:avoid;">
<tr>
<td>{{ include(questionTemplate) }}</td>
</tr>
</table>
{% else %}

            {{ include(questionTemplate) }}
            {% endif %}
            {% endfor %} 
        &lt;/div>
    &lt;/div>
&lt;/groupsection> 

{% endfor %}

DenisChenu

DenisChenu

2019-08-28 09:42

developer   ~53319

Yes Mazi : this part is easy to fix BUT all question.questionclass.twig contanis col-sm dic then big place inside each cell.

For this wrapper : i think we can work without table/td. The issue is more in question :)

DenisChenu

DenisChenu

2020-01-21 14:55

developer   ~55407

Files to be edited : https://github.com/LimeSurvey/LimeSurvey/tree/3.x-LTS/themes/survey/vanilla/views/subviews/printanswers/question_types

Issue History

Date Modified Username Field Change
2018-12-17 12:28 DenisChenu New Issue
2018-12-17 12:28 DenisChenu File Added: limesurvey_survey_pdfIssues.lss
2018-12-17 12:28 DenisChenu File Added: pdfIssues_vanilla.zip
2018-12-17 12:28 DenisChenu File Added: simple-print-answres-361286-5.pdf
2018-12-18 15:23 DenisChenu Relationship added related to 14297
2019-01-10 16:01 LouisGac Assigned To => dominikvitt
2019-01-10 16:01 LouisGac Status new => assigned
2019-01-16 15:27 DenisChenu Relationship added related to 14430
2019-02-08 09:25 DenisChenu Relationship added related to 14498
2019-02-12 14:58 DenisChenu Note Added: 50521
2019-02-12 15:03 DenisChenu Relationship deleted related to 14498
2019-02-12 15:04 DenisChenu Note Added: 50522
2019-02-12 15:04 DenisChenu Relationship added related to 14520
2019-03-11 16:14 Mazi Note Added: 50905
2019-03-11 16:46 DenisChenu Note Added: 50909
2019-07-15 11:41 dominikvitt Assigned To dominikvitt => cdorin
2019-08-27 14:53 LouisGac Assigned To cdorin => LouisGac
2019-08-28 09:27 Mazi Note Added: 53318
2019-08-28 09:42 DenisChenu Note Added: 53319
2019-10-08 15:18 DenisChenu Relationship added related to 15389
2020-01-21 14:55 DenisChenu Assigned To LouisGac => cdorin
2020-01-21 14:55 DenisChenu Note Added: 55407
2020-06-27 16:52 DenisChenu Relationship added has duplicate 16435