both Tj and TJ operators should increment text sequence #1241

the text sequence was added to group letters added by the same
content stream operation together for layout analysis. TJ allows for
individual letter positioning in the same operation which modifies
the text matrix while writing whereas Tj just writes the text at the current
location. both should be semantically equivalent for this sequence
number. this was originally added in #61
This commit is contained in:
EliotJones
2026-02-15 12:31:27 -04:00
committed by BobLd
parent d69e3fa6a9
commit f732718852
2 changed files with 3 additions and 1 deletions

View File

@@ -215,6 +215,8 @@
/// <inheritdoc/>
public void ShowText(IInputBytes bytes)
{
TextSequence++;
var currentState = GetCurrentState();
var font = currentState.FontState.FromExtendedGraphicsState

View File

@@ -64,7 +64,7 @@
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 '\'.