survey-pdf 2.0.5 → 2.0.7
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 +3 -3
- package/fesm/survey.pdf.fonts.mjs +1 -1
- package/fesm/survey.pdf.mjs +11 -10
- package/fesm/survey.pdf.mjs.map +1 -1
- package/package.json +2 -2
- package/survey.pdf.fonts.js +1 -1
- package/survey.pdf.fonts.min.js.LICENSE.txt +1 -1
- package/survey.pdf.js +12 -11
- package/survey.pdf.js.map +1 -1
- package/survey.pdf.min.js +1 -1
- package/survey.pdf.min.js.LICENSE.txt +1 -1
package/README.md
CHANGED
|
@@ -39,9 +39,9 @@ SurveyJS PDF Generator allows you to save an unlimited number of custom-built su
|
|
|
39
39
|
## Resources
|
|
40
40
|
|
|
41
41
|
- [Website](https://surveyjs.io/)
|
|
42
|
-
- [Documentation](https://surveyjs.io/
|
|
43
|
-
- [Live Examples](https://surveyjs.io/
|
|
44
|
-
- [What's New](https://surveyjs.io/
|
|
42
|
+
- [Documentation](https://surveyjs.io/pdf-generator/documentation/overview)
|
|
43
|
+
- [Live Examples](https://surveyjs.io/pdf-generator/examples/)
|
|
44
|
+
- [What's New](https://surveyjs.io/stay-updated/major-updates/2024)
|
|
45
45
|
|
|
46
46
|
## Build SurveyJS PDF Generator from Sources
|
|
47
47
|
|
package/fesm/survey.pdf.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - SurveyJS PDF library v2.0.
|
|
2
|
+
* surveyjs - SurveyJS PDF library v2.0.7
|
|
3
3
|
* Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
5
5
|
*/
|
|
@@ -8200,8 +8200,8 @@ class FlatFile extends FlatQuestion {
|
|
|
8200
8200
|
return compositeFlat;
|
|
8201
8201
|
});
|
|
8202
8202
|
}
|
|
8203
|
-
addLine(rowsFlats, currPoint, index) {
|
|
8204
|
-
if (index !==
|
|
8203
|
+
addLine(rowsFlats, currPoint, index, previewValue) {
|
|
8204
|
+
if (index !== previewValue.length - 1) {
|
|
8205
8205
|
rowsFlats[rowsFlats.length - 1].addBrick(SurveyHelper.createRowlineFlat(currPoint, this.controller));
|
|
8206
8206
|
currPoint.yTop += SurveyHelper.EPSILON;
|
|
8207
8207
|
rowsFlats.push(new CompositeBrick());
|
|
@@ -8214,17 +8214,18 @@ class FlatFile extends FlatQuestion {
|
|
|
8214
8214
|
}
|
|
8215
8215
|
generateFlatsContent(point) {
|
|
8216
8216
|
return __awaiter(this, void 0, void 0, function* () {
|
|
8217
|
-
|
|
8217
|
+
const previewValue = this.question.showPreview ? this.question.previewValue : this.question.value;
|
|
8218
|
+
if (!previewValue || previewValue.length === 0) {
|
|
8218
8219
|
return [yield SurveyHelper.createTextFlat(point, this.question, this.controller, this.question.noFileChosenCaption, TextBrick)];
|
|
8219
8220
|
}
|
|
8220
8221
|
const rowsFlats = [new CompositeBrick()];
|
|
8221
8222
|
const currPoint = SurveyHelper.clone(point);
|
|
8222
8223
|
let yBot = currPoint.yTop;
|
|
8223
|
-
for (let i = 0; i <
|
|
8224
|
-
let item = Object.assign({},
|
|
8224
|
+
for (let i = 0; i < previewValue.length; i++) {
|
|
8225
|
+
let item = Object.assign({}, previewValue[i]);
|
|
8225
8226
|
const canPreviewImage = SurveyHelper.canPreviewImage(this.question, item, item.content);
|
|
8226
8227
|
if (canPreviewImage) {
|
|
8227
|
-
item.imageSize = yield SurveyHelper.getCorrectedImageSize(this.controller, { imageWidth: this.question.imageWidth, imageHeight: this.question.imageHeight, imageLink:
|
|
8228
|
+
item.imageSize = yield SurveyHelper.getCorrectedImageSize(this.controller, { imageWidth: this.question.imageWidth, imageHeight: this.question.imageHeight, imageLink: previewValue[i].content, defaultImageWidth: 200, defaultImageHeight: 150 });
|
|
8228
8229
|
}
|
|
8229
8230
|
const availableWidth = this.controller.paperWidth -
|
|
8230
8231
|
this.controller.margins.right - currPoint.xLeft;
|
|
@@ -8233,7 +8234,7 @@ class FlatFile extends FlatQuestion {
|
|
|
8233
8234
|
if (availableWidth < compositeWidth) {
|
|
8234
8235
|
currPoint.xLeft = point.xLeft;
|
|
8235
8236
|
currPoint.yTop = yBot;
|
|
8236
|
-
this.addLine(rowsFlats, currPoint, i);
|
|
8237
|
+
this.addLine(rowsFlats, currPoint, i, previewValue);
|
|
8237
8238
|
}
|
|
8238
8239
|
this.controller.pushMargins(currPoint.xLeft, this.controller.paperWidth - currPoint.xLeft - compositeWidth);
|
|
8239
8240
|
const itemFlat = yield this.generateFlatItem(currPoint, item);
|
|
@@ -8246,7 +8247,7 @@ class FlatFile extends FlatQuestion {
|
|
|
8246
8247
|
if (availableWidth < this.controller.unitWidth) {
|
|
8247
8248
|
currPoint.xLeft = point.xLeft;
|
|
8248
8249
|
currPoint.yTop = yBot;
|
|
8249
|
-
this.addLine(rowsFlats, currPoint, i);
|
|
8250
|
+
this.addLine(rowsFlats, currPoint, i, previewValue);
|
|
8250
8251
|
}
|
|
8251
8252
|
const itemFlat = yield this.generateFlatItem(currPoint, item);
|
|
8252
8253
|
rowsFlats[rowsFlats.length - 1].addBrick(itemFlat);
|
|
@@ -9263,7 +9264,7 @@ class CustomBrick extends PdfBrick {
|
|
|
9263
9264
|
}
|
|
9264
9265
|
}
|
|
9265
9266
|
|
|
9266
|
-
checkLibraryVersion(`${"2.0.
|
|
9267
|
+
checkLibraryVersion(`${"2.0.7"}`, 'survey-pdf');
|
|
9267
9268
|
|
|
9268
9269
|
export { BooleanItemBrick, CheckItemBrick, CheckboxItemBrick, CommentBrick, CompositeBrick, CustomBrick, DocController, DocOptions, DrawCanvas, DropdownBrick, EmptyBrick, EventHandler, FlatBooleanCheckbox as FlatBoolean, FlatCheckbox, FlatComment, FlatCustomModel, FlatDropdown, FlatExpression, FlatFile, FlatHTML, FlatImage, FlatImagePicker, FlatMatrix, FlatMatrixDynamic, FlatMatrixMultiple, FlatMultipleText, FlatPanelDynamic, FlatQuestion, FlatQuestionDefault, FlatRadiogroup, FlatRanking, FlatRating, FlatRepository, FlatSelectBase, FlatSignaturePad, FlatSurvey, FlatTextbox, HTMLBrick, HorizontalAlign, ImageBrick, LinkBrick, PagePacker, PdfBrick, RadioItemBrick, RankingItemBrick, RowlineBrick, SurveyHelper, SurveyPDF, TextBoldBrick, TextBoxBrick, TextBrick, TextFieldBrick, TitlePanelBrick, VerticalAlign };
|
|
9269
9270
|
//# sourceMappingURL=survey.pdf.mjs.map
|