UNPKG

chromiumly

Version:

A lightweight Typescript library that interacts with Gotenberg's different modules to convert a variety of document formats to PDF files.

30 lines (29 loc) 912 B
import { PathLikeOrReadStream } from '../../common'; import { ChromiumOptions } from './common.types'; export type ImageProperties = { format: 'png' | 'jpeg' | 'webp'; quality?: number; omitBackground?: boolean; width?: number; height?: number; clip?: boolean; }; export type ScreenshotOptions = Omit<ChromiumOptions, 'assets' | 'header' | 'footer'> & { properties?: ImageProperties; optimizeForSpeed?: boolean; userPassword?: string; ownerPassword?: string; embeds?: PathLikeOrReadStream[]; }; export type HtmlScreenshotOptions = ScreenshotOptions & { html: PathLikeOrReadStream; }; export type UrlScreenshotOptions = ScreenshotOptions & { url: string; }; export type MarkdownScreenshotOptions = ScreenshotOptions & { html: PathLikeOrReadStream; markdown: PathLikeOrReadStream; header?: PathLikeOrReadStream; footer?: PathLikeOrReadStream; };