Skip to content

Commit

Permalink
handle escaping in pdf doc encoded strings #730
Browse files Browse the repository at this point in the history
  • Loading branch information
EliotJones committed Jan 13, 2024
1 parent 83519b2 commit 8deae4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/UglyToad.PdfPig/Writer/TokenWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ protected virtual void WriteString(StringToken stringToken, Stream outputStream)
{
outputStream.WriteByte(StringStart);

if (stringToken.EncodedWith == StringToken.Encoding.Iso88591)
if (stringToken.EncodedWith == StringToken.Encoding.Iso88591 || stringToken.EncodedWith == StringToken.Encoding.PdfDocEncoding)
{
// iso 88591 (or really PdfDocEncoding in non-contentstream circumstances shouldn't
// have these chars but seems like internally this isn't obeyed (see:
Expand Down

0 comments on commit 8deae4b

Please sign in to comment.