README.md 2.56 KB
Newer Older
1
pdfReport
2 3
==============

4
Use question text to create a pdf report : send it by email, save in survey.
5 6 7 8

## Installation

### Via GIT
9
- Go to your LimeSurvey Directory
Chenu Denis's avatar
Chenu Denis committed
10
- Clone in plugins/pdfReport directory `git https://gitlab.com/SondagesPro/ExportAndStats/pdfReport.git pdfReport`
11

12
### Via ZIP dowload
Chenu Denis's avatar
Chenu Denis committed
13
- Download <https://extensions.sondages.pro/IMG/auto/pdfReport.zip>
14
- Extract : `unzip pdfReport.zip`
Chenu Denis's avatar
Chenu Denis committed
15
- Move the directory to  plugins/ directory inside LimeSurvey
16 17

## Documentation
18 19
- Create a upload question type
- Activate pdfReport : _Use this question as pdf report._ to _Yes_
Chenu Denis's avatar
Chenu Denis committed
20
- **The pdf generated use the text of this question** . You can use expression manager, and class and style to make a beautifull report.
21
- Remind the default system of this question are totally deactivated
22
- Pdf report are saved as files uploaded in survey
23
- Pdf is done and saved only when survey is activated, and when user submit the survey
24
- See other setting
25

26 27
### Style and css usage

Chenu Denis's avatar
Chenu Denis committed
28
The plugin use [tcpdf](https://tcpdf.org/) and [WriteHTML function](https://tcpdf.org/docs/srcdoc/TCPDF/source-class-TCPDF/#17080). The plugin include a basic css file by default. You can replace the css included in the template used by the survey with a `pdfreport.css` in the files directory of the template.
29 30 31 32 33 34 35 36 37 38 39 40

You can use inline style in the content of the question text. For example, you can use `<strong style='color:red;font-size:18pt'>A big and red sentence</strong>`. See more example on tcdpf website : [inline style](https://tcpdf.org/examples/example_006/) or usage of a [css file](https://tcpdf.org/examples/example_061/). Remind PDF is not web, usage of position:abolute or float didn't work exactly as excpected.

### New page

Tcpdf can use `<br pagebreak="true" />` or `<page> content </page>` for page broke, you can use it in the content of the question text. HTML is filtered leaving this part.

### Image inclusion

You can include image with `<img src="/upload/files/picture.png" />` or with [Data URI](https://en.wikipedia.org/wiki/Data_URI_scheme). All image are validated before included in the pdf and replaced by a white 1px size picture if not available. It's better to use local image (or DATA uri) for speedest generation of the pdf.


41 42
## Home page & Copyright
- HomePage <http://extensions.sondages.pro/>
Chenu Denis's avatar
Chenu Denis committed
43
- Copyright © 2015-2018 Denis Chenu <https://sondages.pro>
44
- Copyright © 2017 Réseau en scène Languedoc-Roussillon <https://www.reseauenscene.fr/>
45 46
- Copyright © 2015 Ingeus <http://www.ingeus.fr/>

47
Distributed under [GNU AFFERO GENERAL PUBLIC LICENSE Version 3](http://www.gnu.org/licenses/agpl.txt) licence