Skip to content

Commit

Permalink
Handle LastRenderedPageBreak in RunUtil
Browse files Browse the repository at this point in the history
Add handling for R.LastRenderedPageBreak in the RunUtil class to return an empty string. This ensures that when LastRenderedPageBreak is encountered, no extraneous characters are output, maintaining the integrity of the generated content.
  • Loading branch information
caring-coder committed Sep 20, 2024
1 parent 52dbdde commit c7184dc
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ public static CharSequence getText(Object content) {
if (content instanceof Br br && br.getType() == STBrType.COLUMN) return "\n";
if (content instanceof R.NoBreakHyphen) return "‑";
if (content instanceof R.SoftHyphen) return "\u00AD";
if (content instanceof R.LastRenderedPageBreak) return "";
if (content instanceof R.Sym sym) return "<sym(" + sym.getFont() + ", " + sym.getChar() + ")>";

log.debug("Unhandled object type: {}", content.getClass());
Expand Down

0 comments on commit c7184dc

Please sign in to comment.