We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Adding shape took high memory using Aspose.Slides for Java

Hello Team.

I am a licensed user of aspose and used water marking on PPT document. I have used aspose-slides-18.7-jdk16.jar file for processing but it is taking too much time in process, Please check the below code-

com.aspose.slides.Presentation pres = new com.aspose.slides.Presentation(inStream);
com.aspose.slides.IMasterSlideCollection masters = pres.getMasters();

		for(int page_counter = 1; page_counter <= masters.size(); page_counter++){
			com.aspose.slides.IMasterSlide master = masters.get_Item(page_counter);
			com.aspose.slides.IAutoShape ashp = master.getShapes().addAutoShape(
					com.aspose.slides.ShapeType.Rectangle, 10, 10, 300, 300);
			ashp.addTextFrame(watermarkText);
			ashp.getTextFrame().getParagraphs().get_Item(0).getPortions()
					.get_Item(0).getPortionFormat().setFontHeight(25);
			master.getShapes().reorder(0, ashp);
			ashp.getAutoShapeLock().setSelectLocked(true);
			ashp.getAutoShapeLock().setSizeLocked(true);
			ashp.getAutoShapeLock().setTextLocked(true);
			ashp.getAutoShapeLock().setPositionLocked(true);
			ashp.getAutoShapeLock().setGroupingLocked(true);
		}			

		pres.save(path + fileName, com.aspose.slides.SaveFormat.Pptx);

@praveen043,

I have observed your comments. Can you please try to use Aspose.Slides 18.11 on your end and share feedback with us if there is still an issue.

AsposePPTJar.png (22.8 KB)

Not able to download aspose 18.11 jar for java.
Please check the uploaded image and provide me the link to download the same.

@praveen043,

You can download Aspose.Slides for Java 18.11 Jar from this link. Moreover, in your image as well the reference to 18.11 also exist. You can observe the POM settings for using Aspose.Slides for Java 18.11 from this link.

Dear Team,

We have used the latest Jar files as per your suggestion

Below is the finding-

  1. PPT 7~9.5 mins (aspose-slides-18.11-jdk16.jar)
  2. PDF 7~9.5 mins (aspose-pdf-18.11.jar)
  3. Image 2~3 mins (aspose-imaging-18.11.jar)
  4. Word 1.5~2.5 mins (aspose-words-18.12-jdk16.jar)
  5. Excel 15~45 sec (aspose-cells-18.11.jar)

More than 30 Sec is not acceptable for client, please provide us a valuable options / suggestion.

@praveen043,

I have observed the statistics shared by you and request you to please share that for what actions you are performing to obtain these statistics. Can you please elaborate your requirements so that we may investigate them further on our end.

Thanks for your quick response.

We need to plot water mark on PDF, PPT, Image, Word and excel document.
Only Excel document is working better, it’s may be the jar file size.

@praveen043,

I have observed the information shared by you and request you to please share the source files along with used sample codes on your end. Please also provide Java, Operating System and machine details on your end.

@praveen043,

I have observed the information shared by you and request you to please share the source files along with used sample codes on your end. Please also provide Java, Operating System and machine details on your end.

Please check the below details as per your request-

Java:- jdk1.8.0_25"
OS:- Windows 10, 64 bit
Machine Details:- i5, 16GB RAM
Eclipse:- Eclipse 64
I have also attached the source code.

WaterMarkUtil_java.zip (2.8 KB)

@praveen043,

Thank you for sharing the information. As requested earlier, please provide the source file used on your end to reproduce the issue.

Thanks for your quick reply

First time it’s taking too much time after that it’s working properly.

@praveen043,

It’s good to know things are fine on your end. Should we consider this thread to be closed now.

No, need to configure the functionality to work properly at first action.

@praveen043,

Thank you for your feedback.