survey-pdf 1.9.32 → 1.9.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +68 -100
- package/package.json +1 -1
- package/survey.pdf.d.ts +2 -2
- package/survey.pdf.fonts.js +1 -1
- package/survey.pdf.fonts.min.js +1 -1
- package/survey.pdf.js +3 -3
- package/survey.pdf.min.js +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
SurveyJS PDF exporter library is an easy way to render [SurveyJS Library](https://surveyjs.io/Overview/Library/) surveys to PDF which can be emailed or printed.
|
|
1
|
+
# SurveyJS PDF Export
|
|
4
2
|
|
|
5
3
|
[](https://dev.azure.com/SurveyJS/SurveyJS%20Integration%20Tests/_build/latest?definitionId=7&branchName=master)
|
|
6
4
|
<a href="https://github.com/surveyjs/survey-pdf/issues">
|
|
@@ -10,102 +8,72 @@ SurveyJS PDF exporter library is an easy way to render [SurveyJS Library](https:
|
|
|
10
8
|
<img alt="Closed issues" title="Closed Issues" src="https://img.shields.io/github/issues-closed/surveyjs/survey-pdf.svg">
|
|
11
9
|
</a>
|
|
12
10
|
|
|
11
|
+
SurveyJS PDF Export is a client-side extension over the [SurveyJS Library](https://github.com/surveyjs/survey-library) that enables users to save surveys as PDF documents.
|
|
12
|
+
|
|
13
13
|
### Features
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
});*/
|
|
81
|
-
|
|
82
|
-
surveyPDF.onRenderHeader.add(function(_, canvas) {
|
|
83
|
-
canvas.drawText({
|
|
84
|
-
text:
|
|
85
|
-
"SurveyJS PDF | Please purchase a SurveyJS PDF developer license to use it in your app | https://surveyjs.io/Buy",
|
|
86
|
-
fontSize: 10
|
|
87
|
-
});
|
|
88
|
-
});
|
|
89
|
-
surveyPDF.save();
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
### Examples
|
|
93
|
-
|
|
94
|
-
- [es5 style example](https://surveyjs.io/Examples/Pdf-Export)
|
|
95
|
-
- [angular-cli](https://codesandbox.io/s/survey-pdf-angular-example-xpev7)
|
|
96
|
-
|
|
97
|
-
### Constraints
|
|
98
|
-
|
|
99
|
-
- No support of dynamic elements (visibleIf, buttons, validators, etc.)
|
|
100
|
-
- Implied DPI 72 when set questions width
|
|
101
|
-
- Question Text input types supported: text, password, color
|
|
102
|
-
- Question Radiogroup not able to set readOnly for separate items
|
|
103
|
-
- Question Imagepicker imagefit is always fill
|
|
104
|
-
- Question Html support restricted subset of html markup
|
|
105
|
-
- Question File save files via RMB in Chrome only
|
|
106
|
-
- Question Panel state is always expanded
|
|
107
|
-
- Question Panel Dynamic mode is only list and state default
|
|
108
|
-
|
|
109
|
-
### License
|
|
110
|
-
|
|
111
|
-
[Commercial](https://surveyjs.io/Home/Licenses#PdfExport)
|
|
15
|
+
- Support for all built-in SurveyJS Library question types
|
|
16
|
+
- Export of survey results
|
|
17
|
+
- Interactive PDF documents that allow users to fill them
|
|
18
|
+
- Automatic page breaks
|
|
19
|
+
- Markdown support
|
|
20
|
+
- Customizable page format and font
|
|
21
|
+
- Header and footer support
|
|
22
|
+
- An API to save a PDF document on the user's computer or get raw PDF content
|
|
23
|
+
|
|
24
|
+
## Get Started
|
|
25
|
+
|
|
26
|
+
- [Angular](https://surveyjs.io/Documentation/Pdf-Export?id=get-started-angular)
|
|
27
|
+
- [Vue](https://surveyjs.io/Documentation/Pdf-Export?id=get-started-vue)
|
|
28
|
+
- [React](https://surveyjs.io/Documentation/Pdf-Export?id=get-started-react)
|
|
29
|
+
- [Knockout](https://surveyjs.io/Documentation/Pdf-Export?id=get-started-knockout)
|
|
30
|
+
- [jQuery](https://surveyjs.io/Documentation/Pdf-Export?id=get-started-jquery)
|
|
31
|
+
|
|
32
|
+
## Resources
|
|
33
|
+
|
|
34
|
+
- [Website](https://surveyjs.io/)
|
|
35
|
+
- [Documentation](https://surveyjs.io/Documentation/Pdf-Export)
|
|
36
|
+
- [Live Examples](https://surveyjs.io/Examples/Pdf-Export)
|
|
37
|
+
- [What's New](https://surveyjs.io/WhatsNew)
|
|
38
|
+
|
|
39
|
+
## Build SurveyJS PDF Export from Sources
|
|
40
|
+
|
|
41
|
+
1. **Clone the repo**
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
git clone https://github.com/surveyjs/survey-pdf.git
|
|
45
|
+
cd survey-pdf
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
1. **Install dependencies**
|
|
49
|
+
Make sure that you have Node.js v6.0.0 or later and npm v2.7.0 or later installed.
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
npm install
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
1. **Build the library**
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
npm run build_prod
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
You can find the built scripts and style sheets in the `survey-pdf` folder under the `packages` directory.
|
|
62
|
+
|
|
63
|
+
1. **Run test examples**
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
npm start
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
This command runs a local HTTP server at http://localhost:7777/.
|
|
70
|
+
|
|
71
|
+
1. **Run unit tests**
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
npm test
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Licensing
|
|
78
|
+
|
|
79
|
+
SurveyJS PDF Export is **not available for free commercial usage**. If you want to integrate it into your application, you must purchase a [commercial license](/Licenses#SurveyCreator).
|
package/package.json
CHANGED
package/survey.pdf.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*Type definitions for SurveyJS PDF library v1.9.
|
|
1
|
+
/*Type definitions for SurveyJS PDF library v1.9.35
|
|
2
2
|
Copyright (c) 2015-2022 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
3
3
|
Definitions by: Devsoft Baltic OÜ <https://github.com/surveyjs/>
|
|
4
4
|
*/
|
|
@@ -601,7 +601,7 @@ export declare class FlatMatrixRow extends FlatRadiogroup {
|
|
|
601
601
|
generateFlatsContent(point: IPoint): Promise<IPdfBrick[]>;
|
|
602
602
|
protected generateTextComposite(point: IPoint, column: ItemValue, index: number): Promise<IPdfBrick>;
|
|
603
603
|
protected generateItemCompoiste(point: IPoint, column: ItemValue, index: number): Promise<IPdfBrick>;
|
|
604
|
-
protected generateFlatsHorizontallyCells(point: IPoint): Promise<IPdfBrick[]>;
|
|
604
|
+
protected generateFlatsHorizontallyCells(point: IPoint): Promise<(IPdfBrick | CompositeBrick)[]>;
|
|
605
605
|
protected generateFlatsVerticallyCells(point: IPoint): Promise<IPdfBrick[]>;
|
|
606
606
|
}
|
|
607
607
|
|
package/survey.pdf.fonts.js
CHANGED
package/survey.pdf.fonts.min.js
CHANGED