ExportForm
This feature relies on access to Wolfram Cloud.

ExportForm[expr,"fmt"]
specifies that expr should be exported in the specified format in functions like CloudDeploy and in external results from APIFunction and FormFunction.

ExportForm[expr,{"fmt","type"}]
specifies that when expr is exported, it should be tagged as having the specified MIME type.

DetailsDetails

  • All formats supported by Export can be specified in ExportForm.
  • Common cases include:
  • "HTML"pure static HTML
    "CDF"downloadable standalone CDF
    "GIF","JPEG","PNG",GIF, JPEG, PNG, ... image
    "Text"plain text (OutputForm)
    "String"single string without line breaks
    "WL"Wolfram Language input
    "JSON"JSON representation of an association or list of rules
  • The following additional formats are also supported:
  • "HTMLThemed"static HTML with built-in theme
    "HTMLPaneled"HTML content in a panel
    "HTMLCloudCDF"pure HTML with CloudCDF if needed
    "CloudCDF"CloudCDF with interactive components in the cloud
    "CloudCDFElement"embeddable interactive CDF element in the cloud
  • The format None specifies that expr should be passed through without change.
  • ExportForm supports the same options as Export, including ImageFormattingWidth and ImageSize, for appropriate formats.

ExamplesExamplesopen allclose all

Basic Examples  (2)Basic Examples  (2)

Deploy a graphic to the cloud as a GIF image:

In[1]:=
Click for copyable input
Out[1]=

Import the image from the cloud:

In[2]:=
Click for copyable input
Out[2]=

Deploy a Graphics expression to the cloud:

In[3]:=
Click for copyable input
Out[3]=

Import the Graphics expression:

In[4]:=
Click for copyable input
Out[4]=

The imported object is a Wolfram Language expression, not an image:

In[5]:=
Click for copyable input

Deploy a list of rules to the cloud in JSON format:

In[1]:=
Click for copyable input
Out[1]=

Retrieve the rules from the cloud:

In[2]:=
Click for copyable input
Out[2]=
Introduced in 2014
(10.0)
Translate this page: