Lost page number

Hello,

We use Aspose.Slide 7.5.1 to work with presentations. For one presentation, I have tried to copy slide from one to another. The slide copied successful, but in the new presentation page number has been lost.

In attachments:
original presentation - DGF_Ocean-Freight-for-Chemicals_EN.ppt
result presentation - slide_4.ppt
screenshot for compare - screenshots.PNG

Hi Citbor,


I have obsreved the presentation files shared and suggest you to please try using Aspose.Slides for Java 7.6.0 on your end. If there is still an issue then please share the sample code with us so that I may observe the issue further to help you out.

Many Thanks,

Hi Mudassir,
I have checked this issue with Aspose 7.6.0, it still is reproduced.
This my code for test:
try {
final String filename = AsposeUtilsTest.class.getResource("/ppt/DGF_Ocean-Freight-for-Chemicals_EN_wl_without10.ppt").getPath();
final String result = AsposeUtilsTest.class.getResource("/ppt/result").getPath() + “/slide_4.ppt”;

final Presentation pres = new Presentation(filename);
final Slide slide = pres.getSlides().get_Item(4);

final Presentation dstPres = new Presentation();
final SortedList ids = new SortedList();
pres.cloneSlide(slide, 0, dstPres, ids);

final Slide empty = dstPres.getSlideByPosition(dstPres.getFirstSlideNumber());
dstPres.getSlides().remove(empty);

dstPres.write(result);

} catch(Exception e) {
e.printStackTrace();
}

Hi Citbor,

I have worked with the presentation file shared and have modified the sample code. Please try using following sample code on your end and share with us if there is any further issue incurring on your end.

public static void TestPPTClone()
{
try {
String path=“D:\Aspose Data\”;
String filename = path+“DGF_Ocean-Freight-for-Chemicals_EN.ppt”;
String result = path+“result.ppt”;

final Presentation pres = new Presentation(filename);
final Slide slide = pres.getSlides().get_Item(4);

final Presentation dstPres = new Presentation();
final com.aspose.slides.Collections.SortedList ids = new com.aspose.slides.Collections.SortedList();
pres.cloneSlide(slide, 0, dstPres, ids);

final Slide empty = dstPres.getSlideByPosition(dstPres.getFirstSlideNumber());
dstPres.getSlides().remove(empty);

dstPres.getSlides().get_Item(0).getHeaderFooter().setPageNumberVisible(true);
dstPres.write(result);

} catch(Exception e) {
e.printStackTrace();
}

}

Many Thanks,

Hi Mudassir,

Thanks for your response. I have checked your code, all works fine, but I have a question.
I have attached another presentation, for which the page numbers copied without calling method
setPageNumberVisible(true). Could your explain for my clear understanding, what’s the differences between presentations?

Hi Citbor,

I like to share that theoretically Aspose.Slides must have copied the property value to display the slide number during cloning process. What I shared with you was the mechansim to avoid the issue on your end. I have created an issue with ID SLIDESJAVA-34057 to further investigate and resolve the issue that why slide number was not being displayed after slide cloning automatically.

Many Thanks,

Hi Mudassir,

Thank you for response.

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


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