Search code examples
c#pdfencryptionxamarinsyncfusion

Xamarin - Decrypting PDFs not supported?


I am using Syncfusion PDF library in my Xamarin project and I am trying to decrypt a PDF using the user password and I keep getting: System.NotSupportedException: Encrypted Document are currently not supported. All I do is:

PdfLoadedDocument loadedDocument = new PdfLoadedDocument(byteArray, "userPassword");

I can understand the meaning of the exception, but I was just wondering if there is any way of doing what I need to do.

Thanks!


Solution

  • Encrypted PDF are not supported on WinRT, Windows Phone, Xamarin, Universal Windows Platform and Silverlight

    public PdfLoadedDocument( 
       string filename,
       string password
    )
    

    Remarks

    This constructor is not supported in WinRT, Windows Phone, Xamarin, Universal Windows Platform and Silverlight

    Ref: http://help.syncfusion.com/cr/cref_files/wpf/pdf/Syncfusion.Pdf.Base~Syncfusion.Pdf.Parsing.PdfLoadedDocument~_ctor(String,String).html