diff --git a/src/UglyToad.PdfPig/Encryption/EncryptionHandler.cs b/src/UglyToad.PdfPig/Encryption/EncryptionHandler.cs index fb9757f8..f02f1c6d 100644 --- a/src/UglyToad.PdfPig/Encryption/EncryptionHandler.cs +++ b/src/UglyToad.PdfPig/Encryption/EncryptionHandler.cs @@ -64,6 +64,9 @@ case HexToken hex: documentIdBytes = hex.Bytes.ToArray(); break; + case StringToken str: + documentIdBytes = str.GetBytes(); + break; default: documentIdBytes = OtherEncodings.StringAsLatin1Bytes(token.Data); break;