Message Boards Message Boards

GROUPS:

How Can I Disable Printing in CDFs?

Posted 4 years ago
3315 Views
|
3 Replies
|
2 Total Likes
|

Hello everyone,

I'd like to build some light security into the CDFs I create for my students. How can I disable printing and copying of images and text? I can do that with PDFs in the Preview PDF app for Mac's, and I'm hoping I can do it with CDFs. I know that the effectives of this security is minimal, but along with a built-in expiration, this added security will slow information leakage a little.

Gregory

3 Replies

For some reason my original response got duplicated... see the following for the full text.

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.)

Thanks David,

Looks promising. I'll give it a whirl.

Regards,

Gregory

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