survey-pdf 1.9.80 → 1.9.81
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/package.json +2 -2
- package/survey.pdf.d.ts +23 -6
- package/survey.pdf.fonts.js +1 -1
- package/survey.pdf.fonts.min.js +1 -1
- package/survey.pdf.js +237 -167
- package/survey.pdf.min.js +4 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "survey-pdf",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.81",
|
|
4
4
|
"description": "survey.pdf.js is a SurveyJS PDF Library. It is a easy way to export SurveyJS surveys to PDF. It uses JSON for survey metadata.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Survey",
|
|
@@ -26,6 +26,6 @@
|
|
|
26
26
|
"typings": "survey.pdf.d.ts",
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"jspdf": "^2.3.0",
|
|
29
|
-
"survey-core": "1.9.
|
|
29
|
+
"survey-core": "1.9.81"
|
|
30
30
|
}
|
|
31
31
|
}
|
package/survey.pdf.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/*Type definitions for SurveyJS PDF library v1.9.
|
|
1
|
+
/*Type definitions for SurveyJS PDF library v1.9.81
|
|
2
2
|
Copyright (c) 2015-2023 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
3
3
|
Definitions by: Devsoft Baltic OÜ <https://github.com/surveyjs/>
|
|
4
4
|
*/
|
|
5
5
|
// Dependencies for this module:
|
|
6
6
|
// ../../../../survey-core
|
|
7
7
|
|
|
8
|
-
import { SurveyModel } from 'survey-core';
|
|
8
|
+
import { SurveyModel, EventBase } from 'survey-core';
|
|
9
9
|
import { IQuestion, Question, QuestionRatingModel, QuestionFileModel, LocalizableString } from 'survey-core';
|
|
10
10
|
import { ItemValue, QuestionBooleanModel } from 'survey-core';
|
|
11
11
|
import { QuestionCheckboxModel } from 'survey-core';
|
|
@@ -25,7 +25,6 @@ import { PanelModel } from 'survey-core';
|
|
|
25
25
|
import { QuestionMatrixModel, MatrixRowModel } from 'survey-core';
|
|
26
26
|
import { QuestionMatrixDropdownModelBase } from 'survey-core';
|
|
27
27
|
import { QuestionMultipleTextModel } from 'survey-core';
|
|
28
|
-
import { EventBase } from 'survey-core';
|
|
29
28
|
import { PageModel } from 'survey-core';
|
|
30
29
|
|
|
31
30
|
/**
|
|
@@ -145,6 +144,9 @@ export declare class SurveyPDF extends SurveyModel {
|
|
|
145
144
|
* A repository with classes that render elements to PDF. Use its `create` method if you need to create a new instance of a rendering class.
|
|
146
145
|
*/
|
|
147
146
|
onRenderPage: EventAsync<SurveyPDF, AdornersPageOptions>;
|
|
147
|
+
onDocControllerCreated: EventBase<SurveyPDF, {
|
|
148
|
+
controller: DocController;
|
|
149
|
+
}>;
|
|
148
150
|
onRenderCheckItemAcroform: EventAsync<SurveyPDF, any>;
|
|
149
151
|
onRenderRadioGroupWrapAcroform: EventAsync<SurveyPDF, any>;
|
|
150
152
|
onRenderRadioItemAcroform: EventAsync<SurveyPDF, any>;
|
|
@@ -454,6 +456,8 @@ export interface IDocOptions {
|
|
|
454
456
|
textFieldRenderAs?: 'singleLine' | 'multiLine';
|
|
455
457
|
/**
|
|
456
458
|
* Specifies whether to compress the PDF document. Compressed documents do not support [custom fonts](https://surveyjs.io/Documentation/Pdf-Export?id=Customization-ChangeFonts#use-custom-font).
|
|
459
|
+
*
|
|
460
|
+
* Default value: `false`
|
|
457
461
|
*/
|
|
458
462
|
compress?: boolean;
|
|
459
463
|
/**
|
|
@@ -462,6 +466,12 @@ export interface IDocOptions {
|
|
|
462
466
|
* If you enable the `applyImageFit` property, the quality of images may be lower because they pass through several conversions. If `applyImageFit` is disabled, exported images fill the entire container and do not preserve their aspect ratio, but their quality remains the same because they are exported as is.
|
|
463
467
|
*/
|
|
464
468
|
applyImageFit?: boolean;
|
|
469
|
+
/**
|
|
470
|
+
* Specifies whether the PDF document contains text in right-to-left languages.
|
|
471
|
+
*
|
|
472
|
+
* Default value: `false`
|
|
473
|
+
*/
|
|
474
|
+
isRTL?: boolean;
|
|
465
475
|
}
|
|
466
476
|
export declare class DocOptions implements IDocOptions {
|
|
467
477
|
static readonly MM_TO_PT: number;
|
|
@@ -482,6 +492,7 @@ export declare class DocOptions implements IDocOptions {
|
|
|
482
492
|
protected _compress: boolean;
|
|
483
493
|
protected _applyImageFit: boolean;
|
|
484
494
|
protected _useLegacyBooleanRendering: boolean;
|
|
495
|
+
protected _isRTL: boolean;
|
|
485
496
|
constructor(options: IDocOptions);
|
|
486
497
|
get leftTopPoint(): IPoint;
|
|
487
498
|
get fontSize(): number;
|
|
@@ -498,6 +509,7 @@ export declare class DocOptions implements IDocOptions {
|
|
|
498
509
|
get compress(): boolean;
|
|
499
510
|
get applyImageFit(): boolean;
|
|
500
511
|
get useLegacyBooleanRendering(): boolean;
|
|
512
|
+
get isRTL(): boolean;
|
|
501
513
|
}
|
|
502
514
|
/**
|
|
503
515
|
* The `DocController` object includes an API that allows you to configure the resulting PDF document. You can access this object within functions that handle the `SurveyPDF`'s [`onRender...`](https://surveyjs.io/pdf-generator/documentation/api-reference/surveypdf#onRenderFooter) events.
|
|
@@ -552,7 +564,7 @@ export declare class FlatRepository {
|
|
|
552
564
|
static getInstance(): FlatRepository;
|
|
553
565
|
register(modelType: string, rendererConstructor: FlatConstructor): void;
|
|
554
566
|
isTypeRegistered(type: string): boolean;
|
|
555
|
-
create(survey: SurveyPDF, question:
|
|
567
|
+
create(survey: SurveyPDF, question: Question, docController: DocController, type?: string): IFlatQuestion;
|
|
556
568
|
}
|
|
557
569
|
|
|
558
570
|
export interface IFlatQuestion {
|
|
@@ -573,6 +585,10 @@ export declare class FlatQuestion implements IFlatQuestion {
|
|
|
573
585
|
generateFlats(point: IPoint): Promise<IPdfBrick[]>;
|
|
574
586
|
}
|
|
575
587
|
|
|
588
|
+
export declare class FlatQuestionDefault extends FlatQuestion {
|
|
589
|
+
generateFlatsContent(point: IPoint): Promise<IPdfBrick[]>;
|
|
590
|
+
}
|
|
591
|
+
|
|
576
592
|
export declare class FlatBooleanCheckbox extends FlatQuestion {
|
|
577
593
|
protected survey: SurveyPDF;
|
|
578
594
|
protected controller: DocController;
|
|
@@ -975,6 +991,7 @@ export declare class PdfBrick implements IPdfBrick {
|
|
|
975
991
|
* @returns A flat array of nested PDF bricks.
|
|
976
992
|
*/
|
|
977
993
|
unfold(): IPdfBrick[];
|
|
994
|
+
protected getCorrectedText(val: string): string;
|
|
978
995
|
}
|
|
979
996
|
|
|
980
997
|
export declare class BooleanItemBrick extends CheckItemBrick {
|
|
@@ -1167,8 +1184,8 @@ export declare class AdornersBaseOptions {
|
|
|
1167
1184
|
constructor(point: IPoint, bricks: IPdfBrick[], controller: DocController, repository: FlatRepository, module: any);
|
|
1168
1185
|
}
|
|
1169
1186
|
export declare class AdornersOptions extends AdornersBaseOptions {
|
|
1170
|
-
question:
|
|
1171
|
-
constructor(point: IPoint, bricks: IPdfBrick[], question:
|
|
1187
|
+
question: Question;
|
|
1188
|
+
constructor(point: IPoint, bricks: IPdfBrick[], question: Question, controller: DocController, repository: FlatRepository, module: any);
|
|
1172
1189
|
}
|
|
1173
1190
|
export declare class AdornersPanelOptions extends AdornersBaseOptions {
|
|
1174
1191
|
panel: PanelModel;
|
package/survey.pdf.fonts.js
CHANGED
package/survey.pdf.fonts.min.js
CHANGED