Skip to content

Latest commit

 

History

History
46 lines (35 loc) · 2.48 KB

types.md

File metadata and controls

46 lines (35 loc) · 2.48 KB

IHTMLProps

Properties Definition
document (IHTMLDocument) Html file or string and data to fill the variables.
options (IPDFProps) Optional: Handlebar options.

IHTMLDocument

Properties Definition
html (String) Html file or string
data (T) Data to fill html handlebar template

IPDFProps

Properties Definition
format (PaperFormat) The print paper format
landscape (Boolean) Data to fill html handlebar template
border (IPDFMargin) Data to fill html handlebar template
header (String) Header string or html
footer (String) Footer string or html

IPDFMargin

Properties Definition
top (String or Number) Optional: Top margin
bottom (String or Number) Optional: Bottom margin
left (String or Number) Optional: Left margin
right (String or Number) Optional: Right margin

HTMLTwoPDFResult

Properties Definition
toBuffer (() => Buffer) Function that returns pdf on Buffer format
toFile ((path: string) => void) Function that receives a path and save a .pdf file
toStream (() => Readable) Function that returns a pdf on Readable Stream format

PaperFormat

Definition
letter, legal, tabloid, ledger, a0, a1, a2, a3, a4, a5 and a6. Can be in uppercase, lowercase or capitalize