survey-pdf 2.0.8 → 2.0.10
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/fesm/pdf-form-filler-shared.mjs +195 -0
- package/fesm/pdf-form-filler-shared.mjs.map +1 -0
- package/fesm/pdf-form-filler.mjs +26 -0
- package/fesm/pdf-form-filler.mjs.map +1 -0
- package/fesm/pdf-form-filler.node.mjs +27 -0
- package/fesm/pdf-form-filler.node.mjs.map +1 -0
- package/fesm/survey.pdf.fonts.mjs +1 -1
- package/fesm/survey.pdf.mjs +5 -2
- package/fesm/survey.pdf.mjs.map +1 -1
- package/package.json +10 -2
- package/pdf-form-filler.js +591 -0
- package/pdf-form-filler.js.map +1 -0
- package/pdf-form-filler.min.js +2 -0
- package/pdf-form-filler.min.js.LICENSE.txt +5 -0
- package/pdf-form-filler.node.js +614 -0
- package/pdf-form-filler.node.js.map +1 -0
- package/pdf-form-filler.node.min.js +2 -0
- package/pdf-form-filler.node.min.js.LICENSE.txt +5 -0
- package/survey.pdf.fonts.js +1 -1
- package/survey.pdf.fonts.min.js.LICENSE.txt +1 -1
- package/survey.pdf.js +5 -2
- package/survey.pdf.js.map +1 -1
- package/survey.pdf.min.js +1 -1
- package/survey.pdf.min.js.LICENSE.txt +1 -1
- package/typings/entries/forms-node.d.ts +3 -0
- package/typings/entries/forms.d.ts +3 -0
- package/typings/pdf_forms/adapters/adapter.d.ts +3 -0
- package/typings/pdf_forms/adapters/pdf-lib.d.ts +6 -0
- package/typings/pdf_forms/adapters/pdfjs.d.ts +6 -0
- package/typings/pdf_forms/forms-base.d.ts +32 -0
- package/typings/pdf_forms/forms-node.d.ts +4 -0
- package/typings/pdf_forms/forms.d.ts +4 -0
- package/typings/pdf_forms/map.d.ts +7 -0
|
@@ -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 {};
|