Skip to content

Commit 08b2443

Browse files
author
Open Lowcode SAS
committed
Close #57
1 parent e339b6a commit 08b2443

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/org/openlowcode/tools/pdf/FormattableSectionText.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ public PartialPrintFeedback printPartial(
134134
float leftinmm,
135135
float rightinmm) throws IOException {
136136
logger.finest(" >>>> print partial");
137+
138+
137139
BoxTextContent lastfeedback = null;
138140
for (int i=this.activesectionindex;i<this.sectionstoprint.size();i++) {
139141
FormattedText activetext = this.sectionstoprint.get(i);
@@ -148,6 +150,7 @@ public PartialPrintFeedback printPartial(
148150
this.activesectionremainingtext=lastfeedback.getTextleftout();
149151
return new PartialPrintFeedback(0, false);
150152
}
153+
151154
if (i<this.sectionstoprint.size()-1) {
152155
this.activesectionindex++;
153156
this.activesectionremainingtext=this.sectionstoprint.get(activesectionindex).getText();

src/org/openlowcode/tools/pdf/PDFPage.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1477,8 +1477,8 @@ public static BoxTextContent calculateBoxAndMaybeWriteText(
14771477
}
14781478
} else {
14791479
// check if still in box
1480-
int partialparagraphcount = i + 1;
1481-
int partiallinecount = totallinecounter + j + 1;
1480+
int partialparagraphcount = i + 1+startatparagraph;
1481+
int partiallinecount = totallinecounter + j + 1+startatline;
14821482
float heightsofar = new BoxTextContent(partiallinecount, partialparagraphcount, texttype,
14831483
compactprint).getHeight();
14841484
if (heightsofar <= maxheight) {
@@ -1844,6 +1844,8 @@ public float getHeightWithoutFinalSpacing() {
18441844
return getHeight(false);
18451845
}
18461846

1847+
1848+
18471849
private float getHeight(boolean finalspacing) {
18481850
if ((texttype == PDFPage.TEXTTYPE_PLAIN) || (texttype == PDFPage.TEXTTYPE_PLAIN_ITALIC)
18491851
|| (texttype == PDFPage.TEXTTYPE_PLAIN_BOLD) || (texttype == PDFPage.TEXTTYPE_PLAIN_BOLD_ITALIC)
@@ -1883,6 +1885,8 @@ public float getHeight() {
18831885
return getHeight(true);
18841886

18851887
}
1888+
1889+
18861890
}
18871891

18881892
/**

0 commit comments

Comments
 (0)