Skip to content

Commit 13348f3

Browse files
author
Open Lowcode SAS
committed
Close #67
1 parent d73b262 commit 13348f3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ public ParagraphHeader(String text) {
4242
@Override
4343
public void print(PDFPageBand pageband, PDFPage currentpage, float mmfromtopforsection, float leftinmm,
4444
float rightinmm) throws IOException {
45-
PDFPage.calculateBoxAndMaybeWriteText(leftinmm, mmfromtopforsection, rightinmm, text, true, currentpage,
45+
PDFPage.calculateBoxAndMaybeWriteText(leftinmm+mmleftmargin, mmfromtopforsection, rightinmm, text, true, currentpage,
4646
PDFPage.TEXTTYPE_PARAGRAPH_HEADER);
4747

4848
}
4949

5050
@Override
5151
public float getSectionHeight(float leftinmm, float rightinmm) throws IOException {
52-
return PDFPage.calculateBoxAndMaybeWriteText(leftinmm, 0, rightinmm, text, false, null,
52+
return PDFPage.calculateBoxAndMaybeWriteText(leftinmm+mmleftmargin, 0, rightinmm, text, false, null,
5353
PDFPage.TEXTTYPE_PARAGRAPH_HEADER).getHeight();
5454
}
5555

@@ -61,7 +61,7 @@ public boolean breakableSection() {
6161
@Override
6262
public PartialPrintFeedback printPartial(PDFPageBand pageband, float spaceleft, PDFPage currentpage,
6363
float mmfromtopforsection, float leftinmm, float rightinmm) throws IOException {
64-
float heightforremaining = PDFPage.calculateBoxAndMaybeWriteText(leftinmm, 0, rightinmm, remainingtext, false,
64+
float heightforremaining = PDFPage.calculateBoxAndMaybeWriteText(leftinmm+mmleftmargin, 0, rightinmm, remainingtext, false,
6565
null, PDFPage.TEXTTYPE_PARAGRAPH_HEADER).getHeight();
6666

6767
this.remainingtext = PDFPage.writeAsMuchTextAsPossible(leftinmm + mmleftmargin, mmfromtopforsection, rightinmm,

0 commit comments

Comments
 (0)