epos-print-xml
Version:
A package to produce the xml needed for Epson Server Direct Print
17 lines (16 loc) • 970 B
TypeScript
export declare const sanitise: (xmlString: string) => string;
export declare class PrintDataNode {
private tagName;
children: PrintDataNode[];
text: string;
att: Record<string, string | number>;
constructor(tagName: string, att?: Record<string, string | number>, children?: PrintDataNode[], text?: string);
xml(rootNode?: boolean): string;
}
export declare const text: (text?: string, att?: Record<string, string | number>) => PrintDataNode;
export declare const feed: (lines?: number) => PrintDataNode;
export declare const cut: () => PrintDataNode;
export declare const image: (width: number, height: number, base64Image: string, align?: string) => PrintDataNode;
export declare const qrCode: (text: string, width?: string) => PrintDataNode;
export declare const eposPrintJob: (printData: PrintDataNode[], devId?: string, timeout?: number) => PrintDataNode;
export declare const eposPrintRequest: (printJobs: PrintDataNode[]) => PrintDataNode;