survey-pdf 2.0.9 → 2.1.0

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.
Files changed (37) hide show
  1. package/fesm/pdf-form-filler-shared.mjs +32 -23
  2. package/fesm/pdf-form-filler-shared.mjs.map +1 -1
  3. package/fesm/pdf-form-filler.mjs +10 -1
  4. package/fesm/pdf-form-filler.mjs.map +1 -1
  5. package/fesm/pdf-form-filler.node.mjs +1 -1
  6. package/fesm/survey.pdf.fonts.mjs +1 -1
  7. package/fesm/survey.pdf.mjs +6 -3
  8. package/fesm/survey.pdf.mjs.map +1 -1
  9. package/forms-typings/entries/helpers.d.ts +7 -0
  10. package/{typings → forms-typings}/pdf_forms/adapters/pdf-lib.d.ts +1 -1
  11. package/{typings → forms-typings}/pdf_forms/adapters/pdfjs.d.ts +1 -1
  12. package/forms-typings/pdf_forms/forms-base.d.ts +123 -0
  13. package/forms-typings/pdf_forms/forms.d.ts +13 -0
  14. package/package.json +3 -2
  15. package/pdf-form-filler.js +42 -20
  16. package/pdf-form-filler.js.map +1 -1
  17. package/pdf-form-filler.min.js +1 -1
  18. package/pdf-form-filler.min.js.LICENSE.txt +1 -1
  19. package/pdf-form-filler.node.js +33 -20
  20. package/pdf-form-filler.node.js.map +1 -1
  21. package/pdf-form-filler.node.min.js +1 -1
  22. package/pdf-form-filler.node.min.js.LICENSE.txt +1 -1
  23. package/survey.pdf.fonts.js +1 -1
  24. package/survey.pdf.fonts.min.js.LICENSE.txt +1 -1
  25. package/survey.pdf.js +6 -3
  26. package/survey.pdf.js.map +1 -1
  27. package/survey.pdf.min.js +1 -1
  28. package/survey.pdf.min.js.LICENSE.txt +1 -1
  29. package/typings/survey.d.ts +1 -1
  30. package/typings/helper_test.d.ts +0 -21
  31. package/typings/pdf_forms/forms-base.d.ts +0 -32
  32. package/typings/pdf_forms/forms.d.ts +0 -4
  33. /package/{typings → forms-typings}/entries/forms-node.d.ts +0 -0
  34. /package/{typings → forms-typings}/entries/forms.d.ts +0 -0
  35. /package/{typings → forms-typings}/pdf_forms/adapters/adapter.d.ts +0 -0
  36. /package/{typings → forms-typings}/pdf_forms/forms-node.d.ts +0 -0
  37. /package/{typings → forms-typings}/pdf_forms/map.d.ts +0 -0
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - SurveyJS PDF library v2.0.9
2
+ * surveyjs - SurveyJS PDF library v2.1.0
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
  */
@@ -136,7 +136,7 @@ export declare class SurveyPDF extends SurveyModel {
136
136
  private correctBricksPosition;
137
137
  protected renderSurvey(controller: DocController): Promise<void>;
138
138
  /**
139
- * An asynchronous method that starts the download of the generated PDF file in the web browser.
139
+ * An asynchronous method that starts to download the generated PDF file in the web browser.
140
140
  *
141
141
  * [View Demo](https://surveyjs.io/pdf-generator/examples/save-completed-forms-as-pdf-files/ (linkStyle))
142
142
  * @param fileName *(Optional)* A file name with the ".pdf" extension. Default value: `"survey_result.pdf"`.
@@ -1,21 +0,0 @@
1
- import { Question } from 'survey-core';
2
- import { IPoint, IRect, IDocOptions } from './doc_controller';
3
- import { IPdfBrick } from './pdf_render/pdf_brick';
4
- import { SurveyPDF } from './survey';
5
- export declare class TestHelper {
6
- static readonly BASE64_IMAGE_16PX: string;
7
- static readonly BASE64_IMAGE_100PX: string;
8
- static get defaultPoint(): IPoint;
9
- static get defaultRect(): IRect;
10
- static get defaultOptions(): IDocOptions;
11
- static wrapRect(rect: IRect): IPdfBrick;
12
- static wrapRects(rects: IRect[]): IPdfBrick[];
13
- static wrapRectsPage(rects: IRect[]): IPdfBrick[][];
14
- static equalRects(expect: any, rects1: IRect[], rects2: IRect[], strictMode?: boolean): void;
15
- static equalRect(expect: any, rect1: IRect, rect2: IRect): void;
16
- static equalPoint(expect: any, point1: IPoint, point2: IPoint): void;
17
- static getTitleText(question: Question): string;
18
- }
19
- export declare class SurveyPDFTester extends SurveyPDF {
20
- get haveCommercialLicense(): boolean;
21
- }
@@ -1,32 +0,0 @@
1
- import { IPDFFormAdapter } from './adapters/adapter';
2
- interface IPDFFormFillerOptions {
3
- fieldMap: any;
4
- data: any;
5
- pdfTemplate: string;
6
- pdfLibraryAdapter: IPDFFormAdapter;
7
- }
8
- export declare abstract class PDFFormFillerBase {
9
- constructor(options?: IPDFFormFillerOptions);
10
- pdfTemplate: string;
11
- fieldMap: any;
12
- data: any;
13
- pdfLibraryAdapter: IPDFFormAdapter;
14
- protected getPDFBytes(): Promise<string>;
15
- /**
16
- * An asynchronous method that allows you to get PDF content in different formats.
17
- *
18
- * [View Demo](https://surveyjs.io/pdf-generator/examples/convert-pdf-form-blob-base64-raw-pdf-javascript/ (linkStyle))
19
- *
20
- * @param type *(Optional)* One of `"blob"`, `"bloburl"`, `"dataurlstring"`. Do not specify this parameter if you want to get raw PDF content as a string value.
21
- *
22
- */
23
- raw(type?: 'blob' | 'bloburl' | 'dataurlstring'): Promise<string | Blob>;
24
- protected abstract saveToFile(pdfBytes: string, fileName: string): Promise<void>;
25
- /**
26
- * An asynchronous method that starts download of the generated PDF file in the web browser.
27
- *
28
- * @param fileName *(Optional)* A file name with the ".pdf" extension. Default value: `"survey_result.pdf"`.
29
- */
30
- save(fileName?: string): Promise<void>;
31
- }
32
- export {};
@@ -1,4 +0,0 @@
1
- import { PDFFormFillerBase } from './forms-base';
2
- export declare class PDFFormFiller extends PDFFormFillerBase {
3
- protected saveToFile(pdfBytes: string, fileName: string): Promise<void>;
4
- }
File without changes
File without changes