Free Support Forum -

German umlaut characters in password

Are the german umlaut characters (äöü) not allowed as password or part of the password when encrypting a PDF document?
When I use one of those characters in a password I get this error when encrypting a pdf: : ‘Permissions check failed (invalid Perms literals).’



Thank you for contacting support.

Please note that Aspose.PDF for .NET mimics the behavior of Adobe Acrobat. Would you please share a PDF file encrypted with Adobe Acrobat which contains respective characters as password, or part of password. Please also share the code snippet which reproduces the error you are currently facing, so that we may try to reproduce and investigate the scenario in our environment.

here is the code snippet I use to encrypt my pdf. Please not the password (müller) with german umlaut characters. If I change it to ‘muller’ everything works fine.

    Dim outputdoc As Aspose.Pdf.Document = Nothing

    outputdoc = New Aspose.Pdf.Document("test_original.pdf")
        outputdoc.Encrypt("müller", "test", Aspose.Pdf.Permissions.FillForm Or Aspose.Pdf.Permissions.PrintDocument Or Aspose.Pdf.Permissions.PrintingQuality, Aspose.Pdf.CryptoAlgorithm.AESx256)
        Console.WriteLine("password was set ")
    Catch ex As Exception
        Console.WriteLine("Error setting password PDF file:" + ex.Message)
    End Try

    Console.WriteLine("Press any key to finish")



Thank you for sharing the code snippet.

We have investigated the scenario and have figured out it is not a problem with German umlaut characters but the problem appears when CryptoAlgorithm.AESx256 is used to encrypt the file, as other enumeration values work fine. A ticket with ID PDFNET-45490 has been logged in our issue management system for further investigation and resolution. The ticket ID has been linked with this thread so that you will receive notification as soon as the ticket is resolved.

We are sorry for the inconvenience.