survey-pdf
Version:
Renders JSON-driven SurveyJS forms and their responses as PDF documents in the browser or Node.js: fillable interactive PDF forms (AcroForm) or static printouts.
24 lines (23 loc) • 966 B
TypeScript
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;