How can I programmatically create a CDF which is similar to the CDFs created by File -> CDF Export -> Standalone...
? Export
supports CDFs but it does not use the same options as File -> Export... and it does not seem to allow setting the WindowSize
which I also need.
My current solution is the following (ugly):
manip = Manipulate[Plot[k x, {x, 0, 10}], {k, 1, 5}, SaveDefinitions -> True]
Export["file.cdf",
doc = CreateDocument[manip,
ScrollingOptions -> {"VerticalScrollRange" -> Fit},
ShowCellBracket -> False,
Deployed -> True, CellContext -> Notebook,
TrackCellChangeTimes -> False]];
NotebookClose[doc]