You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xmlgraphics.apache.org by "siebej (via GitHub)" <gi...@apache.org> on 2026/07/22 09:11:38 UTC
Re: [PR] FOP-2469: Auto table layout [xmlgraphics-fop]
siebej commented on PR #95:
URL: https://github.com/apache/xmlgraphics-fop/pull/95#issuecomment-5044013818
While stress-testing this patch on a 943-page document (Dutch government publication with 536 auto-layout tables) we hit an NPE in `ColumnSetup.redistributeAuto`: `tLM.getPossibleWidths(tcol, context)` returns `null` for columns without PrimaryGridUnits (empty columns in a table with a fixed width), but unlike `redistribute()` this method does not null-check before calling `getMax()`.
Suggested fix, mirroring the null handling in `redistribute()`:
```java
MinOptMax possibleWidth = tLM.getPossibleWidths(tcol, context);
if (possibleWidth == null) {
// no PrimaryGridUnits in this column; its width is zero
continue;
}
```
With that fix (and a rebuilt event model for `columnsInAutoTableTooWide`) the whole 943-page document renders in ~9 seconds with sensible content-based column widths. Happy to share test material if useful.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@xmlgraphics.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: commits-help@xmlgraphics.apache.org