Skip to content

API reference / Common / Engine types / TextChunk

Type Alias: TextChunk ​

ts
type TextChunk = 
  | {
  text: number[];
}
  | {
  adjustment: number;
}
  | {
  unencoded: string;
};

A piece of a show-text operation: either glyph bytes to paint or a horizontal adjustment.

PDF TJ interleaves byte strings with positioning adjustments; Tj/'/" produce a single Text(bytes) element.