Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
75
PDF Viewer with Security
posted

Hi Team,

i have a requirement were we will show the PDF document using a webbrowers, but end User should not have permission to save/print/copy the pdf document, It should be completely a read only document, Please guide me for a infragistics web control which helps me in accomplishing my task.

Thanks Ashok C R

Parents
  • 20255
    Offline posted

    Hello Ashok,

    Thank you for contacting us!

    About your question, there is a control that can fulfill this functionality. The control is WebDocumentExporter and you can set this limitations like this:

    Infragistics.Documents.Reports.Report.Report report = new Infragistics.Documents.Reports.Report.Report();
     
    ((report.Preferences).PDF).Viewer.HideMenubar = true;
    ((report.Preferences).PDF).Viewer.HideToolbar = true;
    ((report.Preferences).PDF).Viewer.HideWindowUI = true;
     
    //Encryption has been requested for the document being published but encryption is not supported in this release.
    (((report.Preferences).PDF).Encryptor).Permissions.Add = false;
    (((report.Preferences).PDF).Encryptor).Permissions.Copy = false;
    (((report.Preferences).PDF).Encryptor).Permissions.Modify = false;
    (((report.Preferences).PDF).Encryptor).Permissions.Print = false;
     
    this.documentExporter.Export(WebDataGrid1, report);

     

    Although you need to keep in mind some things. Due to pending government approval regarding export limitations, encryption-related functionality has been disabled for some releases.

    The following is a list of properties that are affected by this limitation:

    -Infragistics.Documents.Reports.PDF.IPermissions.Add
    -Infragistics.Documents.Reports.PDF.IPermissions.Copy
    -Infragistics.Documents.Reports.PDF.IPermissions.Modify
    -Infragistics.Documents.Reports.PDF.IPermissions.Print
    -Infragistics.Documents.Reports.Report.Preferences.PDF.IPassword.Owner
    -Infragistics.Documents.Reports.Report.Preferences.PDF.IPassword.User

    Related references:

    http://ko.infragistics.com/community/forums/t/13759.aspx

    http://help.infragistics.com/Help/Doc/WinForms/2012.1/CLR2.0/html/Win_Known_Issues.html

    http://help.infragistics.com/Help/Doc/WinForms/2013.1/CLR4.0/html/Win_Known_Issues_in_2012_Volume_2.html

    Also, it is currently not allowed to disable the saving/downloading of any PDF displayed on the client. More about this you can find here:

    http://forums.adobe.com/thread/466540

    If you have any further questions, please let me know!

Reply Children