I want to know how can I see only the output when I deploy the Mathematica notebook in Player Pro as in CDF Player?

I have gone through this screencast on How to Encrypt Your Code for Deployment, but I haven't understood it properly.

  • $\begingroup$ I'm having a similar problem with CDF player, I can't deploy it $\endgroup$ – Billy Rubina Jul 10 '12 at 11:05
  • $\begingroup$ @GustavoBandeira: For deploying in CDF, you can use CDF Deploy. For eg. CDFDeploy[ToFileName["path", "name of cdf"]] path is where you want the cdf to be deployed. name of cdf is what name do you want to give to cdf which is to be deployed. $\endgroup$ – Jennifer Jul 10 '12 at 11:07
  • $\begingroup$ I know, but my code has something that does not let me deploy it, I'm not sure of what it should be. $\endgroup$ – Billy Rubina Jul 10 '12 at 11:09
  • $\begingroup$ As far as I know, cdf cannot have dynamic import. May be your code has dynamic importing. $\endgroup$ – Jennifer Jul 10 '12 at 11:12
  • $\begingroup$ If it can't have dynamic, what should I use to make dynamic content? - Imagine I want to have an InputField and a Button, I input a value in the InputField and then pressing the button will append this value to a list, and this list is gonna be printed in some plot - Everytime I press the Button, the listplot must be refreshed. - How can it be done? $\endgroup$ – Billy Rubina Jul 10 '12 at 11:15

If your question is really "How do I remove the input?", then you can evaluate

NotebookPut[DeleteCases[NotebookGet[], Cell[_, "Input", ___], Infinity]]

to create a fresh copy of a notebook with no Input cells in it. Then save as CDF.

  • $\begingroup$ Its working fine when I execute the code for once. But when I I am closing Mathematica, cdf is not working. Why? How can I rectify this $\endgroup$ – Jennifer Jul 12 '12 at 5:44

Consider two versions of CDF:


  • Save as -> cdf (not deployed): you can see literally the source code via hitting shift+ctrl+E (hard to comprehend though ).

Deploy a cdf without showing source code:

  • click the output in your notebook.

  • choose File -> Deploy -> Standalone -> current selection

  • export this cdf to the selected location

You can also, copy the out put and simply paste it into a new CDF document.

You can typically make what you want to do with input work by hardcoding possible selections rather than free input. Make a List[] of options that some selection mechanism will access. Your selection of input just becomes another dynamic element. This should achieve what you want.

Note: you can also access any of Wolfram's computable data within a CDF.

Best if you can post an example of what you have tried. Then responders can give you more specific solutions.


To prevent your code from appearing in the CDF file, simply double-click on the innermost cell bracket of your output cell. This collapses the input cell. Then select File...Deploy...Standalone...[save entire file)]. The resultant CDF file will neither show the input code nor allow it to be seen at all (since the cell bracket will not be available).


In addition to the methods already suggested by others:

If you would like to have a CDF that consists of a single Manipulate you can simply copy the Manipulate box itself (i.e., the output of the Manipulate) to an empty notebook and save that as a CDF. If initialization with external variables is required use the Manipulate option SaveDefinitions->True and/or wrap your Manipulate in a DynamicModule.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.