UNPKG

md-html-to-pdf

Version:

CLI tool for converting Markdown files or Html files to PDF.

25 lines (24 loc) 976 B
/// <reference types="node" /> import { Config, HtmlConfig, PdfConfig } from "./config"; export type Output = PdfOutput | HtmlOutput; export interface PdfOutput extends BasicOutput { content: Buffer; } export interface HtmlOutput extends BasicOutput { content: string; } interface BasicOutput { filename: string | undefined; } /** * Generate the output (either PDF or HTML). */ export declare function generateOutput(html: string, relativePath: string, config: PdfConfig): Promise<PdfOutput>; export declare function generateOutput(html: string, relativePath: string, config: HtmlConfig): Promise<HtmlOutput>; export declare function generateOutput(html: string, relativePath: string, config: Config): Promise<Output>; export interface GenerateOutputParam { html: string; dest?: string; } export declare function generateOutputs(params: GenerateOutputParam[], relativePath: string, config: PdfConfig | HtmlConfig | Config): Promise<Output[]>; export {};