How to Set UseZip64WhenSaving Property on the ZipFile Instance?

When calling ‘save’ method on an instance of com.aspose.slides.Presentation I get the following error:

Exception in thread “main” class com.aspose.slides.internal.vs.il: The number of entries is 65535 or greater. Consider setting the UseZip64WhenSaving property on the ZipFile instance.

The Aspose slides documentation doesn’t seem to provide information about this setting.

Is there a way to set this? And how should this be done?

@ottevbeek,
Thank you for contacting support.

Please check your results using the latest version of Aspose.Slides for Java if it is possible. If the issue persists, please share the following files and information:

  • presentation file (if you used it)
  • code example that reproduces the error
  • OS version on which the code was executed
  • JDK version in your app
  • Aspose.Slides version you used

Hi Andrey,

While preparing a code example with presentation files to send to you we discovered that our presentation files contain multiple unused layouts which are full of images and .svg files. While these layouts are the same in multiple presentation files they seem to be duplicated for each presentation file. In our situation when merging more than 40 presentations containing these layouts we get this error.

When adding the following line of code our problem was fixed:

sourcePresentation.getLayoutSlides().removeUnused();

@ottevbeek,
We are glad to know that the issue has been resolved on your end. Thank you for using Aspose.Slides.