1
$\begingroup$

When I save a Mathematica notebook using the front-end Save dialog, I can specify the format:

Screenshot of Save dialog window

However, the documentation for the NotebookSave command indicates only that

NotebookSave[notebook, "file"] saves the notebook in the specified file

Is there a way to specify the format when using NotebookSave, like I can when using the visual save dialog? I use Mathematica 9.

$\endgroup$
1
  • 1
    $\begingroup$ I'm assuming that NotebookSave[EvaluationNotebook[], "file.nb", Interactive -> True] is not what you want? $\endgroup$ Dec 6, 2014 at 23:16

1 Answer 1

1
$\begingroup$

NotebookSave saves a Mathematica notebook as is, without converting it to other formats.

To convert to other formats, such as PDF, use Export. Example:

nb = Notebooks[][[1]]
Export["~/Desktop/nb.pdf", nb]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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