Create pdf without possibility to save or print it

Stimulsoft Reports.NET discussion
Post Reply
User avatar
Fabio Pagano
Posts: 355
Joined: Mon Apr 16, 2007 12:38 pm
Location: Bari (Italy)

Create pdf without possibility to save or print it

Post by Fabio Pagano »

I create a pdf (stream) from a report:

Code: Select all

report.ExportDocument(Stimulsoft.Report.StiExportFormat.Pdf, stream)
I need that the user must not have the possibility to save or print the generated pdf.

Is it possibile to do it?

Thank you.
Ivan
Posts: 960
Joined: Thu Aug 10, 2006 1:37 am

Create pdf without possibility to save or print it

Post by Ivan »

Hello,

Please try to use following code:

Code: Select all

            StiPdfExportSettings exportSettings = new StiPdfExportSettings();
            exportSettings.UserAccessPrivileges = StiUserAccessPrivileges.None;
            report.ExportDocument(Stimulsoft.Report.StiExportFormat.Pdf, stream, exportSettings);
The StiUserAccessPrivileges enumeration contains the following elements (flags):
· None,
· PrintDocument,
· ModifyContents,
· CopyTextAndGraphics,
· AddOrModifyTextAnnotations,
· All (by default).

Unfortunately, PDF-specification not contain properties for disable the possibility to save the generated pdf.

Thank you.
Post Reply