THPDFJBIG2Encoder.EncodePagesToByteArrays Method
Encodes all supplied bilevel pages as one trained JBIG2 batch and returns shared global data
Declaration
Function EncodePagesToByteArrays(Const Pages: TJBIG2BatchPageArray;
Var ImageData: TJBIG2EncodedPageArray;
Var GlobalData: TJBIG2ByteArray;
Var Statistics: TJBIG2BatchEncodeStatistics;
Const Options: TJBIG2EncodeOptions;
Const BatchOptions: TJBIG2BatchEncodeOptions): Boolean;
Unit
HPDFJBIG2
Behavior
- Validates every dimension, scanline width, page limit, and aggregate pixel limit before encoding
- Uses the registered external batch backend first and trains repeated symbols across the complete page set
- Uses the native symbol accumulator when the external backend is unavailable and
AllowNativeFallbackis enabled - Returns page streams in input order and one nonempty global dictionary shared by the batch
- Clears outputs and fails without partial results when validation or encoding fails
Statistics
TJBIG2BatchEncodeStatistics reports backend choice, page and input sizes, page and global output bytes, native symbol count, and budget rejection