survey-pdf 1.9.29 → 1.9.32
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 +1 -1
- package/survey.pdf.d.ts +95 -2
- package/survey.pdf.fonts.js +1 -1
- package/survey.pdf.fonts.min.js +1 -1
- package/survey.pdf.js +4 -4
- package/survey.pdf.min.js +2 -2
package/package.json
CHANGED
package/survey.pdf.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*Type definitions for SurveyJS PDF library v1.9.
|
|
1
|
+
/*Type definitions for SurveyJS PDF library v1.9.32
|
|
2
2
|
Copyright (c) 2015-2022 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
3
3
|
Definitions by: Devsoft Baltic OÜ <https://github.com/surveyjs/>
|
|
4
4
|
*/
|
|
@@ -214,25 +214,118 @@ export interface IMargin extends IMarginLR {
|
|
|
214
214
|
bot?: number;
|
|
215
215
|
}
|
|
216
216
|
/**
|
|
217
|
-
*
|
|
217
|
+
* PDF document configuration. Pass it as the second argument to the `SurveyPDF` constructor:
|
|
218
|
+
*
|
|
219
|
+
* ```js
|
|
220
|
+
* const surveyPdf = new SurveyPDF.SurveyPDF(surveyJson, pdfDocOptions);
|
|
221
|
+
* ```
|
|
218
222
|
*/
|
|
219
223
|
export interface IDocOptions {
|
|
224
|
+
/**
|
|
225
|
+
* Page orientation.
|
|
226
|
+
* Accepted values:
|
|
227
|
+
*
|
|
228
|
+
* - `"p"`- Portrait orientation (default).
|
|
229
|
+
* - `"l"` - Landscape orientation.
|
|
230
|
+
*
|
|
231
|
+
* @see format
|
|
232
|
+
*/
|
|
220
233
|
orientation?: 'p' | 'l';
|
|
234
|
+
/**
|
|
235
|
+
* Page format.
|
|
236
|
+
* Accepted values:
|
|
237
|
+
*
|
|
238
|
+
* - `"a0"` - `"a10"` (`"a4"` is default)
|
|
239
|
+
* - `"b0"` - `"b10"`
|
|
240
|
+
* - `"c0"` - `"c10"`
|
|
241
|
+
* - `"dl"`
|
|
242
|
+
* - `"letter"`
|
|
243
|
+
* - `"government-letter"`
|
|
244
|
+
* - `"legal"`
|
|
245
|
+
* - `"junior-legal"`
|
|
246
|
+
* - `"ledger"`
|
|
247
|
+
* - `"tabloid"`
|
|
248
|
+
* - `"credit-card"`
|
|
249
|
+
* - Array<Number> - custom page size in millimeters, for example, `[210.0, 297.0]`.
|
|
250
|
+
*
|
|
251
|
+
* @see orientation
|
|
252
|
+
*/
|
|
221
253
|
format?: string | number[];
|
|
254
|
+
/**
|
|
255
|
+
* Font size in points.
|
|
256
|
+
*
|
|
257
|
+
* @see fontName
|
|
258
|
+
*/
|
|
222
259
|
fontSize?: number;
|
|
260
|
+
/**
|
|
261
|
+
* Font name.
|
|
262
|
+
* Accepted values:
|
|
263
|
+
*
|
|
264
|
+
* - `"Helvetica"` (default)
|
|
265
|
+
* - `"Courier"`
|
|
266
|
+
* - `"Times"`
|
|
267
|
+
* - `"Symbol"`
|
|
268
|
+
* - `"ZapfDingbats"`
|
|
269
|
+
* - `"Segoe"` (requires [additional configuration](https://surveyjs.io/Documentation/Pdf-Export?id=Customization-ChangeFonts))
|
|
270
|
+
* - [Custom font name](https://surveyjs.io/Documentation/Pdf-Export?id=Customization-ChangeFonts#use-custom-font)
|
|
271
|
+
*
|
|
272
|
+
* @see fontSize
|
|
273
|
+
*/
|
|
223
274
|
fontName?: string;
|
|
224
275
|
base64Normal?: string;
|
|
225
276
|
base64Bold?: string;
|
|
226
277
|
useCustomFontInHtml?: boolean;
|
|
278
|
+
/**
|
|
279
|
+
* Page margins. Set this property to an object with the following fields: `top`, `bottom`, `left`, `right`.
|
|
280
|
+
*/
|
|
227
281
|
margins?: IMargin;
|
|
228
282
|
commercial?: boolean;
|
|
283
|
+
/**
|
|
284
|
+
* Removes watermarks from the exported document.
|
|
285
|
+
* **IMPORTANT**: You can enable this property only if you have a SurveyJS PDF Export commercial license. It is illegal to enable this property without a license.
|
|
286
|
+
*/
|
|
229
287
|
haveCommercialLicense?: boolean;
|
|
288
|
+
/**
|
|
289
|
+
* Specifies how to render [HTML questions](https://surveyjs.io/Documentation/Library?id=questionhtmlmodel) into PDF.
|
|
290
|
+
* Accepted values:
|
|
291
|
+
*
|
|
292
|
+
* - `"standard"` - Render HTML questions as selectable text.
|
|
293
|
+
* - `"image"` - Render HTML questions as images.
|
|
294
|
+
* - `"auto"` (default) - Select between the `"standard"` and `"image"` modes automatically based on the HTML content.
|
|
295
|
+
*
|
|
296
|
+
* You can override this property for an individual HTML question. Set the question's `renderAs` property to `"standard"` or `"image"` in the survey JSON definition.
|
|
297
|
+
*/
|
|
230
298
|
htmlRenderAs?: IHTMLRenderType;
|
|
299
|
+
/**
|
|
300
|
+
* Specifies how to render [Matrix](https://surveyjs.io/Documentation/Library?id=questionmatrixmodel), [Matrix Dropdown](https://surveyjs.io/Documentation/Library?id=questionmatrixdropdownmodel), and [Matrix Dynamic](https://surveyjs.io/Documentation/Library?id=questionmatrixdynamicmodel) questions into PDF.
|
|
301
|
+
* Accepted values:
|
|
302
|
+
*
|
|
303
|
+
* - `"list"` - Render matrix-like questions as lists.
|
|
304
|
+
* - `"auto"` (default) - Render matrix-like questions as tables if they fit into the available space. Otherwise, render the questions as lists.
|
|
305
|
+
*
|
|
306
|
+
* You can override this property for an individual matrix-like question. Set the question's `renderAs` property to `"list"` in the survey JSON definition.
|
|
307
|
+
*/
|
|
231
308
|
matrixRenderAs?: 'auto' | 'list';
|
|
232
309
|
booleanRenderAs?: 'default' | 'radiogroup';
|
|
310
|
+
/**
|
|
311
|
+
* Specifies how to render read-only questions.
|
|
312
|
+
* Accepted values:
|
|
313
|
+
*
|
|
314
|
+
* - `"text"` - Render read-only questions as plain text and custom primitives.
|
|
315
|
+
* - `"acroform"` - Use Acrobat Forms (AcroForms) to render questions that support them. Other questions are rendered in `"text"` mode.
|
|
316
|
+
* - `"auto"` (default) - Prefer the `"text"` mode but use `"acroform"` for File question type and links.
|
|
317
|
+
*/
|
|
233
318
|
readonlyRenderAs?: 'auto' | 'text' | 'acroform';
|
|
234
319
|
textFieldRenderAs?: 'singleLine' | 'multiLine';
|
|
320
|
+
/**
|
|
321
|
+
* Specifies whether to compress the PDF document.
|
|
322
|
+
* Compressed documents do not support [custom fonts](https://surveyjs.io/Documentation/Pdf-Export?id=Customization-ChangeFonts#use-custom-font).
|
|
323
|
+
*/
|
|
235
324
|
compress?: boolean;
|
|
325
|
+
/**
|
|
326
|
+
* Specifies whether to apply the [imageFit](https://surveyjs.io/Documentation/Library?id=questionimagemodel#imageFit) property to exported [Image](https://surveyjs.io/Documentation/Library?id=questionimagemodel) questions.
|
|
327
|
+
* 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.
|
|
328
|
+
*/
|
|
236
329
|
applyImageFit?: boolean;
|
|
237
330
|
}
|
|
238
331
|
/**
|
package/survey.pdf.fonts.js
CHANGED
package/survey.pdf.fonts.min.js
CHANGED