Skip to content

Commit 23196ea

Browse files
author
Open Lowcode SAS
committed
Close #66
1 parent 33eee8e commit 23196ea

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

src/org/openlowcode/OLcVersionGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
public class OLcVersionGenerator {
2929
public final static String version = "1.4.1";
3030
public final static String clientversion = "1.4.1";
31-
public final static boolean stable = false;
31+
public final static boolean stable = true;
3232

3333
public static void main(String[] args) {
3434
try {

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

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1396,7 +1396,13 @@ public static BoxTextContent calculateBoxAndMaybeWriteText(
13961396
if (page == null)
13971397
throw new RuntimeException("For write mode, specifying a PDFPage is compulsory");
13981398
SplitString paragraphs = new SplitString(text);
1399-
1399+
1400+
logger.finest("-------------------------------------------------------- PARAGRAPHSPLIT --------------------");
1401+
for (int i=0;i<paragraphs.getNumberOfSections();i++) {
1402+
logger.finest(" >>> "+paragraphs.getTransitionAt(i)+"-"+paragraphs.getSplitStringAt(i));
1403+
}
1404+
logger.finest("---------------------------------------------------------------------------------------------");
1405+
14001406
// newleft is left taking into account left margin for special display (e.g.
14011407
// bullet);
14021408
float margin = (right - left) * getLeftMarginRatio(texttype);
@@ -1531,8 +1537,14 @@ public static BoxTextContent calculateBoxAndMaybeWriteText(
15311537
}
15321538
}
15331539
totallinecounter += paragraphlines.size();
1534-
if (paragraphlines.size() == 0)
1535-
totallinecounter += 1;
1540+
if (paragraphlines.size() == 0) {
1541+
1542+
if (totallinecounter>0) totallinecounter += 1;
1543+
if (totallinecounter==0) totallinecounter += 2;
1544+
1545+
logger.finest(" ----> adding one line counter, value after = "+totallinecounter);
1546+
}
1547+
15361548

15371549
}
15381550
return new BoxTextContent(totallinecounter + startatline, totalparagraphcounter + 1 + startatparagraph,

src/org/openlowcode/tools/richtext/PDFPageBandRichTextUtility.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ public static void insertRichTextInPageBand(PDFPageBand pageband, String sourcet
4747
pageband.printNewSection(sectionsforrichtext[i]);
4848
} else {
4949
ArrayList<RichTextSection> parsedtext = RichTextParser.parseText(sourcetext);
50-
logger.severe("Text parsed with sections = "+parsedtext.size());
50+
logger.finest("Text parsed with sections = "+parsedtext.size());
5151
ArrayList<PDFPageBandSection> sections = parseSections(parsedtext);
52-
logger.severe("Printing sections without simplify in black, sections = "+sections.size());
52+
logger.finest("Printing sections without simplify in black, sections = "+sections.size());
5353
for (int i=0;i<sections.size();i++) {
5454
pageband.printNewSection(sections.get(i));
5555
}

0 commit comments

Comments
 (0)