Message Boards Message Boards

Any New Features to CDF That Came With Mathematica 10?

Posted 10 years ago

Hello everyone,

I was wondering if there are any new features for CDF files or the CDF Player that have been introduced along with Mathematica 10. Is so, where can I read about them? I'm particularly interested in features that would improve CDF use and ease in teaching for students who use the CDF Player app. This is a shout-out to Wolfram for the things I have been hoping for:

  • Encryption, quick and easy with a menu item or preference setting. Presently I have to jump through hoops to overwrite variables containing answers and explanations to dynamic assignments (those where a different set of questions is brought up for each student when they select their student ID in a Manipulate).

  • Passwords and expiry dates done with preference settings, something like Apple's Preview app has for PDFs.

  • "Copy As..." menu item for CDF Player so that students can copy small tables as plain text and images as PDF.



POSTED BY: Gregory Lypny
24 Replies

Does the new CDF Player support the use of packages? There is a video that states that it does not, but I have read discussions here and elsewhere that it does.

If the free player does not support the use of packages, at what level (Enterprise or Player Pro) is this functionality supported?


EnterpriseCDF supports packages (they should be encoded), as did the previous player. Looks like we should qualify this properly in the video you saw, please point me to that. And we'll update our features table to cover this as well.

POSTED BY: Andre Kuzniarek

Is this limited to passing in at page load time or can one pass variables changed by the user via say a button on the page?

POSTED BY: William Stewart

Page load time. So your button rewriting the HTML content would also reload the page for the CDF to act on the change.

POSTED BY: Andre Kuzniarek

Yes, good question... The user can interact with the page via say javascript and can interact with the cdf via the cdf controls but can a changed variable be passed between the two systems - in either direction?

POSTED BY: William Stewart

Variables can only be passed down into the CDF, not back up.

POSTED BY: Andre Kuzniarek
Posted 9 years ago

I have been playing around with these examples and realized I am just setting a static embed tag parameter that is accessed elsewhere on the web page. What is the significance of this advancement? Does it in some way allow me to access a variable set inside the CDF?

POSTED BY: Richard Monke

The parameter in the embed tag can be changed via JavaScript (or through some other AJAX-type of interaction that rewrites HTML on the fly). When the page is refreshed with this new variable setting, the CDF reads it in and applies it, via the CurrentValue["PluginParameters"] feature.

POSTED BY: Andre Kuzniarek

@Andre, there is a list with the new features somewhere?

I believe that WR is working in a new CDF V10 page no?

POSTED BY: Rodrigo Murta

We don't normally publish a list of new features with CDF Player releases, since the purpose of the player is to provide all the new features that come with the Wolfram Language and products like Mathematica and the Programming Cloud. Those features are covered on their respective product pages. However, we are working on some new resource materials that will highlight items of interest to CDF developers. The CDF website pages will also have some updated feature comparison tables going up soon as well...

POSTED BY: Andre Kuzniarek

Excellent. I miss a richer material about CDF, with more realistic examples.

When I say what is new in CDF, is about new specific CDF capabilities like DOM/JavaScript interface, the new ability to remove marketing material in Enterprise version, the new SaveDefinitions in Dynamics for V10 (that make easy to deploy big CDFs), and so on.

POSTED BY: Rodrigo Murta

I revisited the parameter passing thread. Could you please explain in relation to the second example what WRI JS stands for? I guess a javascript library that relates to the plugin or is generic to all plug ins?

POSTED BY: William Stewart

"WRI JS method" refers to the embedding code provided by the CDF export wizard in Mathematica, which includes a call to the JavaScript hosted on our website and also parameter settings expressed as JavaScript. For example:

<script type="text/javascript" src=""></script>
<script type="text/javascript">
var cdf = new cdfplugin();
cdf.setDefaultContent('<a href=""><img  src="SimpleParamTest.png"></a>');
cdf.embed('SimpleParamTest.cdf', 600, 500, {color:"Red", size:100});
POSTED BY: Andre Kuzniarek

I am eager to see the improved CDF player. I would really like to have the ability to embed fonts in CDF (and regular notebooks, for that matter), just as you can embed fonts in PDF. That way, I could be sure that the visual appearance of the document would be constant, regardless of the typefaces installed on the user's system.

If this functionality does not make it to the next release, I hope that it will be considered for a future release.


We are developing a type of CDF that is an an archive of files, much like an application would be, and the goal is for it to also support font inclusion, something I am also very much interested in.

POSTED BY: Andre Kuzniarek

@Andre, an archive file should be very interesting for better distribution of bigger CDF applications. Nice to know.

Hope to see it in WTC2014.

POSTED BY: Rodrigo Murta

I find this exciting.

POSTED BY: William Stewart

Here's another more complete example, including the more robust WRI JS embed code method:

This should be easy to follow when inspecting the page source.

POSTED BY: Andre Kuzniarek

Hi @Andre, an example using get would be nice. So people can change link parameters and see the result.

POSTED BY: Rodrigo Murta

@Rodrigo, thanks for the suggestion, I will try to get back with that in a few days, but feel free to extrapolate such an example to show here if you can get to it sooner.

POSTED BY: Andre Kuzniarek

Sorry to be a bit ignorant but how do I get up the source for this- it works fine.

POSTED BY: William Stewart

@Wiliam, I'm attaching the HTML content, if that's what you are asking for (viewing source is something most web browsers also allow you to do for web pages you view online). The CDF file is the same as posted above.

POSTED BY: Andre Kuzniarek

@Gregory, it's too early yet for us to speak about CDF Player, as that is some weeks away from being released. We can certainly mention some new features of the plugin as now available with Mathematica 10, mainly contextual scaling and being able to pass parameters into the embedded content via the DOM.

Here's a community thread discussing scaling, and some potential confusion associated with it:

As to the handling of parameters, we'll be following up with more details, but as a teaser, I'm attaching an HTML and CDF file demonstrating a basic example of how it works. Bear in mind that this is a non-dynamic method -- the page and plugin content must be updated/refreshed for any parameter change to take effect.

POSTED BY: Andre Kuzniarek
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract