Free Support Forum - aspose.com

Extra spaces before paragraphs after serialize and deserialize with Aspose API

Hi Aspose Support Team,

Attached is a very simple presentation containing a bullet list. When I use following code to load, save, load again and save again, The presentation has extra specings in the paragraphs, although I do nothing else than load and save. This is a serious issue for our project, as we are not able to save intermediate results.

The simplified code

String basePath = "/Users/xy/Downloads/"; PresentationEx presentation = new PresentationEx(basePath + "ListTest.pptx"); presentation.save(basePath + "bulletList_intermediate.pptx", SaveFormat.PPTX); PresentationEx loadedPresentation = new PresentationEx(basePath + "bulletList_intermediate.pptx"); loadedPresentation.save(new FileOutputStream(new File(basePath + "ListTest_withExtraSpace.pptx")), SaveFormat.PPTX);



If you execute above code and compare ListTest.pptx with the resulting ListTest_withExtraSpace.pptx, you will notice a lot of spaces before the text of the paragraph. Interestingly "bulletList_intermediate.pptx is ok…

Thank you for help and regards
Marco

Additionally, following code shows, already the intermediate presentation is wrong after loading the original:



String basePath = "/Users/marcomeyer/Downloads/";
PresentationEx presentation = new PresentationEx(basePath + "ListTest.pptx");
    AutoShapeEx shape = (AutoShapeEx)presentation.getSlides().get(0).getShapes().get(0);
    <br>String firstText = shape.getTextFrame().getParagraphs().get(0).getText();
    System.out.print("--->");


System.out.print(firstText);

System.out.print("<—\n");

    <br>presentation.save(basePath + "bulletList_intermediate.pptx", SaveFormat.PPTX);
    PresentationEx loadedPresentation = new PresentationEx(basePath + "bulletList_intermediate.pptx");

shape = (AutoShapeEx)loadedPresentation.getSlides().get(0).getShapes().get(0); firstText = shape.getTextFrame().getParagraphs().get(0).getText(); System.out.print("--->");
System.out.print(firstText);
System.out.print("<---\n");
loadedPresentation.save(new FileOutputStream(new File(basePath + "ListTest_withExtraSpace.pptx")), SaveFormat.PPTX);



console out:



—>Import test<—

—> Import test <—

and finally I can execute this test with Aspose 2.9.1 which gives me correct results regarding spaces in paragraphs. However, I need Aspose 2.9.5 because a lot of bugfixes in thumbnails in between. So downgrade is no option.

Hi Mam,


Thanks for your investigation and highlighting the issue.

I have worked with the sample presentation shared by you and like to share that the issue stated has already been observed. An issue with ID SLIDESJAVA-33427 has already been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be automatically notified once the issue will be resolved.

We are sorry for your inconvenience,

The issues you have found earlier (filed as SLIDESJAVA-33427) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

The issues you have found earlier (filed as SLIDESJAVA-33799) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.