chromiumly
Version:
A lightweight Typescript library that interacts with Gotenberg's different modules to convert a variety of document formats to PDF files.
29 lines (28 loc) • 895 B
TypeScript
import { PathLikeOrReadStream } from '../../common';
import { DownloadFrom } from '../../common/types';
export type EmulatedMediaType = 'screen' | 'print';
export type Cookie = {
name: string;
value: string;
domain: string;
path?: string;
secure?: boolean;
httpOnly?: boolean;
sameSite?: 'Strict' | 'Lax' | 'None';
};
export type ChromiumOptions = {
header?: PathLikeOrReadStream;
footer?: PathLikeOrReadStream;
emulatedMediaType?: EmulatedMediaType;
waitDelay?: string;
waitForExpression?: string;
extraHttpHeaders?: Record<string, string>;
failOnHttpStatusCodes?: number[];
failOnConsoleExceptions?: boolean;
failOnResourceHttpStatusCodes?: number[];
failOnResourceLoadingFailed?: boolean;
skipNetworkIdleEvent?: boolean;
generateDocumentOutline?: boolean;
cookies?: Cookie[];
downloadFrom?: DownloadFrom;
};