diff --git a/thirdparties-extension/fr.opensagres.poi.xwpf.converter.pdf/src/main/java/fr/opensagres/poi/xwpf/converter/pdf/internal/PdfMapper.java b/thirdparties-extension/fr.opensagres.poi.xwpf.converter.pdf/src/main/java/fr/opensagres/poi/xwpf/converter/pdf/internal/PdfMapper.java index 34d6f8925..4f9d66520 100644 --- a/thirdparties-extension/fr.opensagres.poi.xwpf.converter.pdf/src/main/java/fr/opensagres/poi/xwpf/converter/pdf/internal/PdfMapper.java +++ b/thirdparties-extension/fr.opensagres.poi.xwpf.converter.pdf/src/main/java/fr/opensagres/poi/xwpf/converter/pdf/internal/PdfMapper.java @@ -550,6 +550,7 @@ protected void visitRun( XWPFRun docxRun, boolean pageNumber, String url, IIText StylableParagraph pdfParagraph = (StylableParagraph) pdfParagraphContainer; pdfParagraph.adjustMultipliedLeading( currentRunFontAscii ); + pdfParagraph.adjustLeading(currentRunFontAscii); // addd symbol list item chunk if needed. String listItemText = pdfParagraph.getListItemText(); diff --git a/thirdparties-extension/fr.opensagres.poi.xwpf.converter.pdf/src/main/java/fr/opensagres/poi/xwpf/converter/pdf/internal/elements/StylableParagraph.java b/thirdparties-extension/fr.opensagres.poi.xwpf.converter.pdf/src/main/java/fr/opensagres/poi/xwpf/converter/pdf/internal/elements/StylableParagraph.java index 78ff1083f..4793f8fe0 100644 --- a/thirdparties-extension/fr.opensagres.poi.xwpf.converter.pdf/src/main/java/fr/opensagres/poi/xwpf/converter/pdf/internal/elements/StylableParagraph.java +++ b/thirdparties-extension/fr.opensagres.poi.xwpf.converter.pdf/src/main/java/fr/opensagres/poi/xwpf/converter/pdf/internal/elements/StylableParagraph.java @@ -63,12 +63,15 @@ public class StylableParagraph private Color listItemFontColor; + private boolean defaultLeading = true; + public StylableParagraph( StylableDocument ownerDocument, IITextContainer parent ) { super(); this.ownerDocument = ownerDocument; this.parent = parent; this.originMultipliedLeading = null; + this.defaultLeading = false; } public StylableParagraph( StylableDocument ownerDocument, Paragraph title, IITextContainer parent ) @@ -76,6 +79,7 @@ public StylableParagraph( StylableDocument ownerDocument, Paragraph title, IITex super( title ); this.ownerDocument = ownerDocument; this.parent = parent; + this.defaultLeading = false; } // FIXME check with Angelo the purpose of this method.... @@ -276,4 +280,11 @@ public void adjustMultipliedLeading( Font font ) } } + public void adjustLeading( Font font ){ + if ( font != null ){ + super.setLeading(font.getSize()); + this.defaultLeading = false; + } + } + }