hello together,
we i try to insert a long text using doc4j : 
*word is auto-sizing but no in PDF conversion
is there a method to solve this problem ?
***** code used to convert word to pdf :
File outputfilepath = new File("main" + ".pdf");
    
    OutputStream out = new FileOutputStream(outputfilepath);
    Mapper fontMapper = new IdentityPlusMapper();
    PhysicalFont font = PhysicalFonts.getPhysicalFonts().get("Times New Roman");
    // make sure this is in your regex (if any.)!!!
    if (font != null) {
      fontMapper.getFontMappings().put("Times New Roman", font);
      fontMapper.getFontMappings().put("Arial", font);
    }
    fontMapper.getFontMappings().put("Libian SC Regular", PhysicalFonts.getPhysicalFonts().get("SimSun"));
    wordMLPackage.setFontMapper(fontMapper);
    FOSettings foSettings = Docx4J.createFOSettings();
    foSettings.setFoDumpFile(new java.io.File("main.fo"));
    foSettings.setWmlPackage(wordMLPackage);
    foSettings.setImageIncludeUUID(true);
    Docx4J.toFO(foSettings, out, Docx4J.FLAG_EXPORT_PREFER_XSL);
			
		

 
  News
 News Site map
 Site map SitemapIndex
 SitemapIndex RSS Feed
 RSS Feed