- Index
- »
- io
- »
- func:ioWritePdf
def
func:ioWritePdf
ioWritePdf(val, handle, opts: {})
Render data to a PDF file. The grid meta "view" tag determines the visualization:
table: render grid astable(default)chart: render grid aschartfandoc: render string as fandoctext: render as plaintext
Options:
pageSize: determines the PDF page size
Examples:
// render as chart with default page size
read(power).hisRead(yesterday).ioWritePdf(`io/portrait.pdf`)
// render as chart with landscape page size of 11" x 8.5"
read(power).hisRead(yesterday).ioWritePdf(`io/landscape.pdf`, {pageSize:"11in,8.5in"})
// render table as single auto-fit page
readAll(site).ioWritePdf(`io/sites.pdf`, {pageSize:"auto"})
Note: this feature is available in SkySpark only