survey-pdf 2.0.8 → 2.0.9

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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - SurveyJS PDF library v2.0.8
2
+ * surveyjs - SurveyJS PDF library v2.0.9
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
  */
@@ -0,0 +1,3 @@
1
+ export { PDFFormFiller } from '../pdf_forms/forms-node';
2
+ export { PDFLibAdapter } from '../pdf_forms/adapters/pdf-lib';
3
+ export { PDFJSAdapter } from '../pdf_forms/adapters/pdfjs';
@@ -0,0 +1,3 @@
1
+ export { PDFFormFiller } from '../pdf_forms/forms';
2
+ export { PDFLibAdapter } from '../pdf_forms/adapters/pdf-lib';
3
+ export { PDFJSAdapter } from '../pdf_forms/adapters/pdfjs';
@@ -0,0 +1,3 @@
1
+ export interface IPDFFormAdapter {
2
+ fillForm(template: string, data: any): Promise<string>;
3
+ }
@@ -0,0 +1,6 @@
1
+ import { IPDFFormAdapter } from './adapter';
2
+ export declare class PDFLibAdapter implements IPDFFormAdapter {
3
+ private pdfLibrary;
4
+ constructor(pdfLibrary: any);
5
+ fillForm(template: string, data: any): Promise<any>;
6
+ }
@@ -0,0 +1,6 @@
1
+ import { IPDFFormAdapter } from './adapter';
2
+ export declare class PDFJSAdapter implements IPDFFormAdapter {
3
+ private pdfLibrary;
4
+ constructor(pdfLibrary: any);
5
+ fillForm(template: string, data: any): Promise<any>;
6
+ }
@@ -0,0 +1,32 @@
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 {};
@@ -0,0 +1,4 @@
1
+ import { PDFFormFillerBase } from './forms-base';
2
+ export declare class PDFFormFiller extends PDFFormFillerBase {
3
+ saveToFile(pdfBytes: string, fileName: string): Promise<void>;
4
+ }
@@ -0,0 +1,4 @@
1
+ import { PDFFormFillerBase } from './forms-base';
2
+ export declare class PDFFormFiller extends PDFFormFillerBase {
3
+ protected saveToFile(pdfBytes: string, fileName: string): Promise<void>;
4
+ }
@@ -0,0 +1,7 @@
1
+ export default class FormsMap {
2
+ private map;
3
+ private res;
4
+ constructor(map: any);
5
+ private mapDataRecursive;
6
+ mapData(data: any): any;
7
+ }