Use limeMpdf for printing surveys

More
1 year 4 months ago #205270 by thomasjanotta
Hi Denis, from your doc I cannot see, how to add limeMpdf print link for pdf export. I copied the plugin into "plugins/limeMpdf", I activated the plugin in the manager. I copied the twig (header, body, ffoter) files to my custom theme "upload/themes/survey/extends_fruity/views/subviews/mpdf".
Where do I have to change the generated link to the pdf?
<form action="index.php/printanswers/view?surveyid=675884&amp;printableexport=pdf" method="post">

This is now generated by the default printanswer_head.twig
The topic has been locked.
More
1 year 4 months ago #205294 by DenisChenu
limeMpdf is a tool for other plugin.

It does nothing by itself.

Exemple of usage : gitlab.com/SondagesPro/ExportAndStats/pd...r/pdfReport.php#L540

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development . I don't answer to private message.
The topic has been locked.
More
1 year 4 months ago #205303 by Joffm
Hi,
you only have to upload "pdfreport" and "limeMpdf" to the plugin folder.
Then you have this option in "pdfreport"


Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless
Attachments:
The topic has been locked.
More
1 year 4 months ago #205348 by thomasjanotta
Hallo Joffm (ich steh auf'm Schlauch), many thanks.

I installed limeMpdf and pdfReport and activated it, but WHERE is this menu?

I don't have it in the question (I suggested it).

hmmm

Thanks B)
Attachments:
The topic has been locked.
More
1 year 4 months ago #205350 by Joffm
Hi, Thomas,
you know that you use a question of type "file upload" for "pdfreport"?
And here you find it.

Joffm

And this?

I copied the twig (header, body, ffoter) files to my custom theme "upload/themes/survey/extends_fruity/views/subviews/mpdf".

I have no idea what you tried to do here. Not necessary at all.


Volunteers are not paid.
Not because they are worthless, but because they are priceless
Attachments:
The following user(s) said Thank You: DenisChenu
The topic has been locked.
More
1 year 4 months ago #205371 by DenisChenu
/me must earn @Joffm to create my documentation page ;)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development . I don't answer to private message.
The topic has been locked.
More
1 year 4 months ago - 1 year 4 months ago #205374 by thomasjanotta
Hi folks, thank you.
RTFM ;-)
OK, i got it by looking at the demo. Unfortunately Dennis doesn't show how to 'simply' display Q and A like
{Q00001_SQ001.question}:{Q00001_SQ001.shown}

But now I am looking for code for groupname, everyone is writing books but noone writes the simple answer (as for Q: Q00001_SQ001.question).

Is this really the only way, besides writing the Group name 'manually'...

forums.limesurvey.org/forum/can-i-do-thi...ion-group-in-tempate

@joffm:

the limempdf help says that you should copy these twigs to [/upload/...custom_templ/mpdf] for editing it... :-)

Thanks. Danke.
Last edit: 1 year 4 months ago by thomasjanotta.
The topic has been locked.
More
1 year 4 months ago #205381 by DenisChenu

OK, i got it by looking at the demo. Unfortunately Dennis doesn't show how to 'simply' display Q and A like
{Q00001_SQ001.question}:{Q00001_SQ001.shown}

Not related to plugin manual.limesurvey.org/Expression_Manager

But now I am looking for code for groupname, everyone is writing books but noone writes the simple answer (as for Q: Q00001_SQ001.question).

the limempdf help says that you should copy these twigs to [/upload/...custom_templ/mpdf] for editing it... :-)

gitlab.com/SondagesPro/coreAndTools/limeMpdf#adapt-html-and-css

Only if needed

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development . I don't answer to private message.
The topic has been locked.
More
1 year 4 months ago #205382 by thomasjanotta

OK, i got it by looking at the demo. Unfortunately Dennis doesn't show how to 'simply' display Q and A like
{Q00001_SQ001.question}:{Q00001_SQ001.shown}

Not related to plugin manual.limesurvey.org/Expression_Manager


But in the ES - questions with subquestions
manual.limesurvey.org/ExpressionScript_examples

the limempdf help says that you should copy these twigs to [/upload/...custom_templ/mpdf] for editing it... :-)

gitlab.com/SondagesPro/coreAndTools/limeMpdf#adapt-html-and-css

Only if needed

Yes, when you want to adopt to the company design, you have to :-)

Still looking for groupname.

Thanks
The topic has been locked.
More
1 year 4 months ago #205383 by DenisChenu

OK, i got it by looking at the demo. Unfortunately Dennis doesn't show how to 'simply' display Q and A like
{Q00001_SQ001.question}:{Q00001_SQ001.shown}

Not related to plugin manual.limesurvey.org/Expression_Manager


But in the ES - questions with subquestions
manual.limesurvey.org/ExpressionScript_examples

Expression Script === Expression Manager, just name update.


Still looking for groupname.

Only manual way …

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development . I don't answer to private message.
The topic has been locked.
More
1 year 4 months ago #205386 by thomasjanotta
Thank you.

Has this been solved?

bugs.limesurvey.org/view.php?id=8858
The topic has been locked.
More
1 year 4 months ago #205387 by Joffm
Hi,
here a simple demo.
<section><h1>Teil I</h1>
<h2>Bekanntheit</h2>
{if(Q1_1=="Y","<checkbox-checked>","<checkbox>")} {Q1_1.question}<br />
{if(Q1_2=="Y","<checkbox-checked>","<checkbox>")} {Q1_2.question}<br />
{if(Q1_3=="Y","<checkbox-checked>","<checkbox>")} {Q1_3.question}<br />
{if(Q1_4=="Y","<checkbox-checked>","<checkbox>")} {Q1_4.question}<br />
{if(Q1_5=="Y","<checkbox-checked>","<checkbox>")} {Q1_5.question}<br />
{if(Q1_6=="Y","<checkbox-checked>","<checkbox>")} {Q1_6.question}<br />
{if(Q1_7=="Y","<checkbox-checked>","<checkbox>")} {Q1_7.question}<br />
{if(Q1_8=="Y","<checkbox-checked>","<checkbox>")} {Q1_8.question}<br />
</section>
 
<section>
<h2>Welches dieser Tiere haben Sie als Letztes gegessen?</h2>
{if(Q1_1.NAOK!="Y","",if(Q2==1, "<radio-checked> "+Q1_1.question,"<radio> "+ Q1_1.question))} {if(Q1_1.NAOK=="Y","<br />","")}
{if(Q1_2.NAOK!="Y","",if(Q2==2, "<radio-checked> "+Q1_2.question,"<radio> "+ Q1_2.question))} {if(Q1_2.NAOK=="Y","<br />","")}
{if(Q1_3.NAOK!="Y","",if(Q2==3, "<radio-checked> "+Q1_3.question,"<radio> "+ Q1_3.question))} {if(Q1_3.NAOK=="Y","<br />","")}
{if(Q1_4.NAOK!="Y","",if(Q2==4, "<radio-checked> "+Q1_4.question,"<radio> "+ Q1_4.question))} {if(Q1_4.NAOK=="Y","<br />","")}
{if(Q1_5.NAOK!="Y","",if(Q2==5, "<radio-checked> "+Q1_5.question,"<radio> "+ Q1_5.question))} {if(Q1_5.NAOK=="Y","<br />","")}
{if(Q1_6.NAOK!="Y","",if(Q2==6, "<radio-checked> "+Q1_6.question,"<radio> "+ Q1_6.question))} {if(Q1_6.NAOK=="Y","<br />","")}
{if(Q1_7.NAOK!="Y","",if(Q2==7, "<radio-checked> "+Q1_7.question,"<radio> "+ Q1_7.question))} {if(Q1_7.NAOK=="Y","<br />","")}
{if(Q1_8.NAOK!="Y","",if(Q2==8, "<radio-checked> "+Q1_8.question,"<radio> "+ Q1_8.question))} {if(Q1_8.NAOK=="Y","<br />","")}
</section>
 
<section>
<h2>Bitte bewerten Sie den Geschmack von {Q2.shown}</h2>
{if(Q3b==1,"<radio-checked>","<radio>")} ziemlich eklig<br />
{if(Q3b==2,"<radio-checked>","<radio>")} der Hunger treibt's rein<br />
{if(Q3b==3,"<radio-checked>","<radio>")} geht so<br />
{if(Q3b==4,"<radio-checked>","<radio>")} ganz lecker<br />
{if(Q3b==5,"<radio-checked>","<radio>")} super toll<br />
<br />
<pagebreak>
<table class="table table-bordered">
  <thead>
    <tr class="tablehead">
      <th style="width:25%">#</th>
      <th class="tablecenter" style="width:15%">ziemlich eklig</th>
      <th class="tablecenter" style="width:15%">der Hunger treibt's rein</th>
      <th class="tablecenter" style="width:15%">geht so</th>
      <th class="tablecenter" style="width:15%">lecker</th>
      <th class="tablecenter" style="width:15%">super toll</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th>{Q2.shown}</th>
      <td class="tablecenter">{if(Q3b.NAOK==1,"<radio-checked>","<radio>")}</radio></radio-checked></td>
      <td class="tablecenter">{if(Q3b.NAOK==2,"<radio-checked>","<radio>")}</radio></radio-checked></td>
      <td class="tablecenter">{if(Q3b.NAOK==3,"<radio-checked>","<radio>")}</radio></radio-checked></td>
      <td class="tablecenter">{if(Q3b.NAOK==4,"<radio-checked>","<radio>")}</radio></radio-checked></td>
      <td class="tablecenter">{if(Q3b.NAOK==5,"<radio-checked>","<radio>")}</radio></radio-checked></td>
    </tr>
  </tbody>
</table>
</section>

Just put it into the question code.

I only had thi syntax file, not the survey itself. I created a quick and dirty one.


And

Unfortunately Dennis doesn't show how to 'simply' display Q and A like
{Q00001_SQ001.question}:{Q00001_SQ001.shown}

Why should he? It's all here: ;)
manual.limesurvey.org/ExpressionScript_-...#Access_to_variables

And to come back to my question.
In my opinion these folders are included in the plugin already.
In "lime\plugins\limeMpdf\views\subviews\mpdf"


Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless
Attachments:
The topic has been locked.
More
1 year 4 months ago #205419 by DenisChenu

Thank you.

Has this been solved?

bugs.limesurvey.org/view.php?id=8858

In 4.X via a plugin (core plugin)


And to come back to my question.
In my opinion these folders are included in the plugin already.
In "lime\plugins\limeMpdf\views\subviews\mpdf"

You're totally right, but for example : some user can like to add logo at header, make their own footer.

body are less need, but header and footer can really be intersetig :)

I update the plugin to allow update this 3 twig file in theme editor in some hour.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development . I don't answer to private message.
The topic has been locked.
More
1 year 4 months ago #205434 by thomasjanotta
@Joffm Na gut, Dachs kann ich ja mal probieren, aber Ameise? Nein.
Cool, thank you.

I still have a last question: I put the pdfreport.css in the files/ folder but it is not used. (cleared cache)

with a pdfreport.css in the files directory of the template


Fruity?
my custom template? (limesurvey\upload\themes\survey\_extends_fruity\files\)

Thank you.
Would you, Joffm and Denis, send me your donation links? (paypal, patreon...)
The topic has been locked.
More
1 year 4 months ago #205436 by DenisChenu
pdfreport.css is used only with tcpdf (RTFM please).

WIth limeMpdf : gitlab.com/SondagesPro/coreAndTools/lime...df/style-custom.twig is here for this.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development . I don't answer to private message.
The topic has been locked.

Start now!

Just create your account and start using Limesurvey today.

Register now