GeneratePDFFromFile (open)

Generate a PDF from a file

Syntax

LOADLIB "mod::system/lib/printer.whlib";

RECORD FUNCTION GeneratePDFFromFile(RECORD wrappedfile, RECORD options)

Parameters

RECORD wrappedfile

Wrapped file record to generate a PDF for

RECORD options

Options

INTEGER delay

How much milliseconds to wait after setting the url before taking a screenshot

filename

Output filename.

STRING media

Media to use - 'screen' or 'print' (default)

pdfengine

PDF Engine to use. Defaults to 'chrome' and is currently the only available one

printbackground

Print backgrounds too? (defaults to true)

INTEGER timeout

Timeout (in milliseconds) for PDF generation. Defaults to 30 seconds

Return value

RECORD

Wrapped file containing the PDF