Table of Contents

Export HTML

Block Group: Browser API
Icon:Export HTML block icon

Converts the current component or .dg5 file to HTML, PDF, PNG, or JPG, and either causes the converted file to be downloaded or outputs it as an HTML string or a binary object. If the parent of this dataflow block is the Stage, then the entire page is exported.

For information on using dataflow blocks, see Dataflow.


Input/Output Properties

These properties can take input and give output.

invoke causes the file to be exported. Only works when enabled is set to TRUE.

enabled specifies whether exporting is enabled. The default is TRUE.

format specifies the file format to export. The default is png.

filename specifies a name for the exported file. If the name has no extension, the format is appended as the extension (for example, download becomes download.png). If blank, the file is not downloaded and is returned in output instead. When you add this block from the palette, filename is download.

orientation specifies the page orientation for PDF export: landscape (default) or portrait.

pdfSize specifies the page size for PDF export: a3, a4, a5 (default), letter, legal, or autosize. With autosize, the page is sized to fit the exported content.

pdfOverflow specifies, for PDF export, whether content that does not fit on one page continues on additional pages. The default is FALSE.

scale specifies the resolution factor for PDF export. To sharpen the rendering of content that might be fuzzy, increase this setting. The default is 1.

inlineStyles specifies, for HTML export, whether the page's stylesheets are embedded in the exported file.


Output Properties

These properties can give output. They cannot take input.

loading returns TRUE while the file is being exported. It is hidden on the block by default.

output returns the contents of the exported file, if no filename is defined. For html format, this is an HTML string. For other formats, this is a binary object.


Remarks


Model

These are basic uses of the block.

Dataflow ModelDescription
Export HTML dataflow modelBecause a filename is defined, the HTML file is downloaded.
Export HTML dataflow modelBecause no filename is defined, the HTML string is returned as output.