Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Export answers into a custom designed PDF or similar?

  • DOwen
  • DOwen's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
8 years 7 months ago #123799 by DOwen
Hi all,


We've been building internal company forms with LS and its been a great success so far.

We now want to build a new website that contains forms with complex 'if this then that' questions that are filled in while an agent takes a call. We want the agent to then be presented with a PDF file that contains all the answer data pre populated into a well designed PDF. It would need to be a design that matches our current branding as it would be visible to clients. We currently only use PDF files that are designed within InDesign and filled in using interaction, however we want the forms to be a little more advanced and intuitive.

Could we achieve this somehow with LimeSurvey? If not, would anyone please be able to advise our best option?


Thanks!
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 7 months ago #123806 by holch
Of course you can collect the information with Limesurvey. However, the design of the PDF is a totally different aspect. While Limesurvey offers a certain PDF export option, it is far from being beautiful and it is not a focus of Limesurvey.

However, as Limesurvey is open source and you have access to the database, as it is running on your own server, you can easily access the answers / data collected with other applications and insert the data into an own tool, that is generating your PDF reports. I have no idea what is available out there and what could satisfy your needs for this. What I can think of is that you could create a report page at the end of your LS survey. You could create a nice template that matches your layout requirements (but as it is HTML/CSS it might not look as nice as Indesign documents) and you could then find a routine that "prints" this HTML page as PDF file.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • DOwen
  • DOwen's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
8 years 7 months ago #123808 by DOwen
Hi there and thank you for your response!

It sounds like creating a HTML/CSS version of the PDF, which could then be converted to a PDF somehow (Or just manually saved a PDF by the agent) is the best option. However, I have no idea where to start here. I would guess that there's quite a bit of Javascript and/or SQL involved here of which I'm not proficient.

Are you able to advise where I can start please?
The topic has been locked.
  • LouisGac
  • LouisGac's Avatar
  • Visitor
  • Visitor
8 years 7 months ago #123809 by LouisGac
in global settings, you have an option "Participants may print answers".
You could try to hack this feature, changing its rendering.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 7 months ago #123811 by holch
Actually, if you use the Expression Manager and text display questions on the last page of your survey, you don't really need to use any Javascript or SQL. You can then create a page that shows the results of the survey, before the final submission of the survey.

You could then let them print it via Acrobat (or any PDF print driver).

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • DOwen
  • DOwen's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
8 years 7 months ago #123825 by DOwen
This potentially sounds like a good plan! I've not managed to get into the Expression Manager just yet. Perhaps I should study the manual.

In this scenario, if they had the option to print, what would be the best way to achieve a precisely/well designed PDF?
The topic has been locked.
More
8 years 7 months ago - 8 years 7 months ago #123829 by steve_81
Hi,

I recently designed an end-page for the participant, so he can see an individual evaluation of his answers.
I used the Expression Manager to get the data and displayed it in this case as scales.



You are completly free with the design, just using CSS/HTML.

Printing was one requirement, so I tried printing this with several browsers just clicking file -> print. After a few adjustments, the result satisfied me.

Greets
Stefan
Last edit: 8 years 7 months ago by steve_81.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 7 months ago #123841 by holch
Hey Stefan, this is a great example of what can be done. I guess it took you a while to get there.

How did you implement the styles? In the template itself? Or inline only on the results page?

How did you create the Benchmark? This couldn't have been done with only Expression Manager, because you can't access other results.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
More
8 years 7 months ago #123842 by steve_81
Yes, I defined the styles directly in my template.css

You are absolutly right. At this moment, the Benchmark is a fixed one depending on N=1.600 from a previous survey, but I've already written a database-request (jquery with php), which will give me the Benchmark on the fly, if we have enough participants with this survey.

Greets
Stefan
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 7 months ago #123844 by holch
Sounds pretty nice. Exactly what I had envisioned for DOwen's problem, but without any practical experience. Seeing a live example is really interesting and proves that it is doable.

And in my opinion it looks pretty good. I don't know the standard DOwen is looking for, but for me this looks pretty great.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • DOwen
  • DOwen's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
8 years 7 months ago - 8 years 7 months ago #123848 by DOwen
Oh awesome, that looks really good Stefan!

This will work great for us too, would be great to see more of the background work on this?

I've just been hit with another issue on this project. We are concerned that we may need to go back and edit the answers on the survey/form if a mistake was made or if something needs to be added. Of course we can edit the answers from within the LS Admin, however since the form has already been submitted, we no longer have the completed screen to print off a summary of answers (and/or save a PDF). Is there a way around this?


*Sorry only just realised I've probably posted this in the wrong section!*
Last edit: 8 years 7 months ago by DOwen.
The topic has been locked.
More
8 years 7 months ago - 8 years 7 months ago #123852 by steve_81
The top is the common design of the "welcome id" and the "survey-name class":
Code:
<br />
<div id="welcome">
  <span class="survey-name">Ergebnisse der Auswertung</span></div>
<br />

The rest is a wild combination of tables and divs, inline styles and adjustments. I'm not very proud of the source code it is a mess.

An improvement screenshot:


The first aspect under the first picture (beginning with "Anteil im Büro") looks like this:
Code:
<table style="border:0px; width: 100%">
                  <tbody>
                    <tr style="background: #E0E0E0">
                      <td align="left" colspan="2" width="100%">
                        <b>Anteil im Büro (pro Monat):</b></td>
                    </tr>
                    <tr>
                      <td style="padding: 0px; width: 28px;">
                        <img src="/waytoimages/office" width="100%" /></td>
                      <td>
                        <div class="percent-own" id="pBuero">
                          Eigener Wert:
                          <div id="ppBuero" style="float:right;">
                             </div>
                          <br />
                          <img class="Dreieck" src="/waytoimages/triangledown" /></div> <!-- This is the div which width is given by the Expression Manager, in this case I use javascript, because I have to convert the value of an answer to fit in the scale-->
                        <div class="percent-pre2">
                          Sehr gering</div>
                        <div class="percent-bar2" id="barBuero">
                          <div class="percent-range2" id="Buero25" style="text-align:left;width:24.5%;border-radius: 1em 0em 0em 1em;">
                            0%</div>
                          <div class="percent-range2" id="Buero50" style="width:24.5%;">
                             </div>
                          <div class="percent-range2" id="Buero75" style="width:24.5%;">
                             </div>
                          <div class="percent-range2" id="Buero100" style="width:24.5%; border-radius: 0em 1em 1em 0em;">
                            100%</div>
                        </div>
                        <div class="percent-post2">
                          Sehr hoch</div>
                        <div class="percent-mean" id="mBuero" style="width:63.864%;">
                          <img class="Dreieck" src="/waytoimages/triangleup" /><br />
                          Benchmark:69.8%
                          <div id="mmBuero" style="float:right;">
                             </div>
                        </div>
                      </td>
                    </tr>
                  </tbody>
                </table>

The mentioned javascript part width the value from the survey:
Code:
document.getElementById("pBuero").style.width = "{(ProzentBuero.NAOK*0.7)+15}%"; // ProzentBuero is a hidden equation question which calculates a percentage of beeing in the office

And some styles:
Code:
.percent-pre2 {
    color: #888;
    float: left;
    text-align: right;
    height: 2em;
    position: relative;
    width: 15%;
    right: 0.6em;
    line-height: 2em;
    vertical-align: middle;
    clear: left;
}
 
.percent-bar2 {
    -moz-border-top-colors: none;
    -moz-border-right-colors: none;
    -moz-border-bottom-colors: none;
    -moz-border-left-colors: none;
    border-image: none;
    border-width: 1px 0px;
    height: 2em;
    position: relative;
    font-size: 0.9em;
    float: left;
    width: 70%;
}

It's a completly own designed page, next time I would search for some plugins to display the graphs. There are some good ones out there.
Last edit: 8 years 7 months ago by steve_81.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose