diff --git a/src/UglyToad.PdfPig/Graphics/BaseStreamProcessor.cs b/src/UglyToad.PdfPig/Graphics/BaseStreamProcessor.cs index 17502c481..f72f3ddfa 100644 --- a/src/UglyToad.PdfPig/Graphics/BaseStreamProcessor.cs +++ b/src/UglyToad.PdfPig/Graphics/BaseStreamProcessor.cs @@ -215,6 +215,8 @@ public virtual void PushState() /// public void ShowText(IInputBytes bytes) { + TextSequence++; + var currentState = GetCurrentState(); var font = currentState.FontState.FromExtendedGraphicsState diff --git a/src/UglyToad.PdfPig/Graphics/Operations/TextShowing/ShowText.cs b/src/UglyToad.PdfPig/Graphics/Operations/TextShowing/ShowText.cs index fd9ed9c29..7072b3db9 100644 --- a/src/UglyToad.PdfPig/Graphics/Operations/TextShowing/ShowText.cs +++ b/src/UglyToad.PdfPig/Graphics/Operations/TextShowing/ShowText.cs @@ -64,7 +64,7 @@ public void Run(IOperationContext operationContext) operationContext.ShowText(input); } - string? EscapeText(string? text) + private static string? EscapeText(string? text) { if (text is null) return null; // Fix Issue 350 from PDF Spec 1.7 (page 408) on handling 'special characters' of '(', ')' and '\'.