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 (trigger)
  • enabled (boolean)
  • format (enum or string)
  • filename (string)

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

enabled specifies whether exporting to HTML is enabled.

  • TRUE: The file is exported as specified by invoke.
  • FALSE: The file is not exported.

format specifies the file format to download.

filename specifies a name for the exported file. If blank, the file is returned as an HTML string or binary object in output and is not downloaded.


Output Properties

These properties can give output. They cannot take input.

  • output (string)

output returns the contents of the exported file, if no filename is defined.


Remarks

  • In an exported HTML file, assets stored in the DGLux5 project, such as images, can only be displayed if the user can view the project.

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.