UNPKG

survey-pdf

Version:

A UI component that uses SurveyJS form JSON schemas to render forms as PDF documents. It populates PDF fields with data collected using SurveyJS Form Library and lets you export your SurveyJS forms as editable or pre-filled PDFs.

24 lines (23 loc) 966 B
export interface IImageInfo { data: string | Uint8Array<ArrayBuffer>; width: number; id?: string; height: number; } export interface IImageUtils { getImageInfo(url: string): Promise<IImageInfo>; applyImageFit(imageInfo: IImageInfo, imageFit: 'cover' | 'fill' | 'contain', targetWidth: number, targetHeight: number): Promise<IImageInfo>; clear(): void; } export declare class BaseImageUtils implements IImageUtils { private hash; private imageId; protected getImageId(): string; protected _getImageInfo(url: string): Promise<IImageInfo>; getImageInfo(url: string): Promise<IImageInfo>; applyImageFit(imageInfo: IImageInfo, imageFit: 'cover' | 'fill' | 'contain', targetWidth: number, targetHeight: number): Promise<IImageInfo>; protected get emptyImage(): IImageInfo; clear(): void; } export declare function getImageUtils(): IImageUtils; export declare function registerImageUtils(val: IImageUtils): void;