CDF (.cdf)
Background & Context
-
- MIME types: application/vnd.wolfram.cdf, application/vnd.wolfram.cdf.text
- Wolfram Computable Document Format (CDF).
- Used as a deployment format for interactive use in Wolfram Player.
- ASCII format based on the Wolfram Language expression syntax.
- CDF is an acronym for Computable Document Format.
- Stores text, typeset expressions, graphics, interface elements, and other Wolfram Language input and output.
Import & Export
- Import ["file.cdf"] reads a .cdf file and returns it as a Notebook expression.
- Export ["file.cdf",expr,"CDF"] exports a Notebook or NotebookObject as a .cdf file.
- Import ["file.cdf",elem] imports the specified element from a .cdf file.
- Import ["file.cdf",{{elem1,elem2,…}}] imports multiple elements.
- Export ["file.cdf",expr,{"CDF",elem}] creates a .cdf file by treating expr as specifying element elem.
- Export ["file.cdf",expr,"CDF",opt1->val1,…] exports expr with the specified option elements taken to have the specified values.
- See the following reference pages for full general information:
-
CloudImport , CloudExport import from or export to a cloud objectImportString , ExportString import from or export to a stringImportByteArray , ExportByteArray import from or export to a byte array
Notebook Interface
- File ▶ Save As can be used to save the current notebook to a .cdf file.
- In the notebook front end, File ▶ Preview for Wolfram Player can be used to create a new .cdf file under an Enterprise license.
Import Elements
- General Import elements:
-
"Elements" list of elements and options available in this file"Summary" summary of the file"Rules" list of rules for all available elements
- Data representation elements:
-
"Notebook" Notebook expression representing a .cdf file"NotebookObject" NotebookObject expression"Plaintext" plain text version
- Import by default uses the "Notebook" element for Computable Document Format (CDF) files.
Examples
Basic Examples (1)
Export a notebook with an interactive manipulation to the Computable Document Format (CDF) file:
Related Guides
History
Introduced in 2010 (8.0)