I am creating a computable document format (CDF) to embed in an HTML page. I would like to have a button that can be clicked to create/save a PDF of the CDF fromt he browser. The idea is that a person would be able to manipulate the document, enter in specific values for equations and graphs, and then be able to download the resulting visualization as a PDF.
For starters I have created a simple sin plot and then added a button at the bottom for exporting the document. I am not sure what would go in the Export expression or if the export expression is even the correct approach to doing this.
Here is my code:
sinplot =
Manipulate[Plot[Sin[a x + b], {x, 0, 6}], {a, 1, 4}, {b, 0, 10}];
nb = CreateDocument[
{Cell["Sin Curve Simulation", "Section"],
ExpressionCell[sinplot],
Button["Export Graph", Export[ ... ]]}];
Ideas of how to get this working?