md-html-to-pdf
Version:
CLI tool for converting Markdown files or Html files to PDF.
42 lines (41 loc) • 1.15 kB
TypeScript
import { HtmlConfig, PdfConfig } from "./lib/config";
import { HtmlOutput, PdfOutput } from "./lib/generate-output";
interface ContentInput {
content: string;
}
interface PathInput {
path: string;
}
interface HtmlInput {
html: string;
}
/**
* Convert a markdown file to PDF.
*/
export declare function mdToPdf(input: ContentInput | PathInput | HtmlInput, config?: Partial<PdfConfig>): Promise<PdfOutput>;
export declare function mdToPdf(input: ContentInput | PathInput | HtmlInput, config?: Partial<HtmlConfig>): Promise<HtmlOutput>;
/**
* Convert a markdown file to PDF.
*/
export declare function mdsToPdfs(params: {
input: ContentInput | PathInput | HtmlInput;
config?: Partial<PdfConfig>;
}[], options: {
port?: number;
basedir?: string;
}): Promise<PdfOutput[]>;
export declare function mdsToPdfs(params: {
input: ContentInput | PathInput | HtmlInput;
config?: Partial<HtmlConfig>;
}[], options: {
port?: number;
basedir?: string;
}): Promise<HtmlOutput[]>;
export default mdToPdf;
export interface PackageJson {
engines: {
node: string;
};
version: string;
}