Page 1 of 1

Create pdf without possibility to save or print it

Posted: Thu Dec 24, 2009 8:42 pm
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.

Create pdf without possibility to save or print it

Posted: Sun Dec 27, 2009 6:36 am
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.