Message Boards Message Boards

0
|
7020 Views
|
3 Replies
|
2 Total Likes
View groups...
Share
Share this post:

How Can I Disable Printing in CDFs?

Posted 9 years ago
POSTED BY: Gregory Lypny
3 Replies
Posted 9 years ago
POSTED BY: Gregory Lypny

I am not sure that there is a way to disable printing. However to address whether the material in the CDF can be copied you can do the following (it is a double layer of protection):

If nb is the NotebookObject of the notebook in question (and perhaps you want to work on a copy of the notebook) then execute the following in a separate notebook prior to generating the CDF from the original notebook):

SelectionMove[nb, All, Notebook]

SetOptions[ NotebookSelection[nb], {Copyable -> False, Editable -> False}]

SetOptions[nb, {Copyable -> False, Editable -> False}] 

Of course if the CDF is opened in Mathematica one can always change these settings.

To set nb to be the NotebookObject of the desired notebook you can just execute

nb=EvaluationNotebook[];

in the desired notebook and then delete that code from the notebook before executing the code above in a separate notebook. (Deleting the nb=EvaluationNotebook[];from the desired notebook keeps it from getting its Copyable and Editable settings from locking it in place.)

POSTED BY: David Reiss
POSTED BY: David Reiss
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract