Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

When I prepare a CDF file to be included into a web page, far too much blank vertical space is left over the pane. Is there a command to reduce that? This is illustrated by the files SimpleDemos.nb and SimpleDemos1.cdf.

share|improve this question
2  
How did you prepare the .cdf file? –  Heike Feb 23 '12 at 18:00
    
I made the following guide for myself when CDF first came out. I understand it is irrelevant now because of Mma 8.0.4, but I would still like to know if there a command that reduces the size of a hidden cell to zero. –  SixWingedSeraph Feb 26 '12 at 1:42
    
The guide is at abstractmath.org/Mathematica/MakingPlugIn.pdf –  SixWingedSeraph Feb 26 '12 at 1:55
add comment

1 Answer

You can easily remove all white space around your CDF app. Simplest way - use CDF Web Deployment Wizard available in Mathematica version 8.0.4. It is designed to remove the white space around interactive content and embed it tigtly into a webpage. Follow File » Deploy » Embed in HTML… Here is the result of this workflow applied to the app from your file SimpleDemos.nb and embeding it into WordPress.

The CDF file can be downloaded from here

As you can see there is no horizontal or vertical white space around the app.

I would also recommend controlling the size of embedded CDF with ImageSize->{w, h} option for your internal graphics in Manipulate[...]. Actual app size on the page will be slightly larger due to Manipulate[...] interface with dimensions provided by the wizard. If you would like detailed instructions follow this video.

share|improve this answer
    
I will be able to download 8.0.4 in a couple of months, so that will solve my problem. Thanks. –  SixWingedSeraph Feb 26 '12 at 1:40
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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