From 81bb6fce83345b67b3c73a0fb3414d1c98cdcc1e Mon Sep 17 00:00:00 2001 From: Eliot Jones Date: Sun, 4 Jun 2023 16:49:37 +0100 Subject: [PATCH] use built in encoding handling --- src/UglyToad.PdfPig/Encryption/EncryptionHandler.cs | 3 +++ 1 file changed, 3 insertions(+) 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;