It is currently Sat Jan 11, 2025 10:14 am
<base>./</base>
<font metrics-url="servlet-context:/fonts/DejaVuSerif-Bold.xml" embed-url="servlet-context:/WEB-INF/fonts/DejaVuSerif-Bold.ttf" kerning="yes">
<font-triplet name="DejaVuSerif-Bold" style="normal" weight="normal" />
</font>
FOSettings foSettings = Docx4J.createFOSettings();
foSettings.setWmlPackage(wordMLPackage);
ClassPathResource cpr = new ClassPathResource("fop.conf");
InputStream inputStream = cpr.getInputStream();
StringWriter writer = new StringWriter();
IOUtils.copy(inputStream, writer, "UTF-8");
String conf = writer.toString();
List<Object> paragraphs = getAllElementFromObject(template.getMainDocumentPart(),P.class);
for(Object objP:paragraphs) {
P para = (P) objP;
/***/
List<Object> texts = getAllElementFromObject(para,Text.class);
List<Object> brs = getAllElementFromObject(para,Br.class);
if(brs.size()==1 && checkPageBreak((Br)brs.get(0)) && texts.size()== 0)
remove(template.getMainDocumentPart().getContent(), para);
}
Total posts 10116 • Total topics 2845 • Total members 2076