In our project we work with Jasper to create templates and then export them as word or pdf.
When we export the Word document we try to insert images but the size is trucated vertically and they re not properly displayed , I tried to add linespacing and adjust the height but it doesn’t work
@Mouna87 Could you please attach your output and expected output documents? Do you insert images using Aspose.Words for Java? If so please attach also input MS Word document here for our reference and code you use to insert the image.
I tried this code that you gave as a response on another question but it doesn’t work
// sauvegarde en DOCX
com.aspose.words.LoadOptions lo = new com.aspose.words.LoadOptions();
lo.setLoadFormat(com.aspose.words.LoadFormat.DOCX);
com.aspose.words.Document doc = new com.aspose.words.Document(new ByteArrayInputStream(baos.toByteArray()), lo);
DocumentBuilder builder = new DocumentBuilder(doc);
// And another paragraph with LineSpacingRule.MULTIPLE
builder.getParagraphFormat().setLineSpacingRule(LineSpacingRule.MULTIPLE);
builder.getParagraphFormat().setLineSpacing(12);
//ici on va mettre la langue française par defaut
doc.getStyles().getDefaultFont().setLocaleId(1036);
doc.getStyles().getDefaultParagraphFormat();
// ajout marges (par défaut, la marge de droite n'est pas prise en
// compte d'où la méthode)
doc = ajouterMargesWord(jasperPrint, doc);
ByteArrayOutputStream outStream = new ByteArrayOutputStream();
doc.save(outStream, SaveFormat.DOCX);
@Mouna87 I mean your input MS Word document and output MS Word document in DOCX or other MS Word format. it is difficult to analyze the issue using screenshots.