I was trying to set up a "PDF Print" Button, to enable participants to print out the shown answers. I used jsPDF, which finally worked quite well. jsPDF takes the HTML and some CSS style-information and creates a simple PDF file. Problem is the style-options are rather basic, color-information are lost for example.
Does anyone have any experiences in setting up a jsPDF PDF-Export in lime?
Any other suggestions, how this could be realised?
It's not linked with LimeSUrvey, but seems jsPDF has own system for color/style. In the example:
doc.setTextColor(100);
doc.text(20, 20, 'This is gray.');
Maybe you can try with :
Code:
var doc = new jsPDF();
// We'll make our own renderer to skip this editor
var specialElementHandlers = {
'#editor': function(element, renderer){
return true;
}
};
// All units are in the set measurement for the document
// This can be changed to "pt" (points), "mm" (Default), "cm", "in"
doc.fromHTML($('#render_me').get(0), 15, 15, {
'width': 170,
'elementHandlers': specialElementHandlers
});
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. -
Professional support
-
Plugins, theme and development
. I don't answer to private message.