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

Free Support Forum - aspose.com

How can we Trim WhiteSpaces when cloning a shape within New presentation?

Hello


Is their any way to trim the extra whitespace from the new Presentation’s Slide that is created after cloning a shape from source presentation to that newly created slide.
I tried on chaing the size of slide using

destPres.getSlideSize().getSize().setSize(shape.getWidth(), shape.getHeight());

Here shape object is referring to the shape that we are copying from source presentation to our destination presentation.

I want no extra white space in the slide so that If I export that presentation to other formats such as PDF/HTML I could have only area specific to Shape size without extra white space.

Attaching the WhitespaceImage.jpeg file in which black box is showing exra white space after coyping shape into this presentation
Regards
Shubhi

Hi Shubhi,


Thank you for posting.

I have observed your comments and like to request you to please share with us a sample presentation file which is being converted to pdf with extra white space so that we may investigate it further to help you out.

Best Regards,

Hello


Please find the attached file ppt.rar containing All.pptx whose first slide’s first Chart have been extracted and cloned to new PPT and got saved in PDF format.with name shapepdfchart.pdf

In pdf we have extra white space.How can we trim that extra whit space.

Regards
Shubhi

Hi Shubhi,


I have observed your requirements and the files shared by you. Your desired results could be achieved by setting the slide size as you are doing it on your end, but it is not happening and a ticket with ID SLIDESJAVA-35101 is logged for further investigation and resolution of this problem. 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,

Hello


Is there any update on this issue.

Regards
Shubhi

Hi Shubhi,


I have observed your comments and like to share with you that the issue reported by you, SLIDESJAVA-35101 , has been scheduled for investigations for week 49, 2015. We will share the notification with you as soon as the issue will be fixed. We appreciate your patience in this regard.

Best Regards,

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


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

Hello

I am using Aspose Slides for java 15.9.0.

To remove whitespace from PDF output i tried on changing slide size same as shape size some border lines of the shape is not getting visible.

Please refer to source Code files and source Presentation file being using and output PDF File.

Regards
Shubhi


Hi Shubhi,


Thank you for getting back to us.

I have observed your comments and like to request you to please try using Aspose.Slides for Java 15.11.0 and following sample code on your end, to generate PDF of a shape.

Presentation pres = new Presentation();

IChart chart = pres.getSlides().get_Item(0).getShapes().addChart(ChartType.Doughnut, 0, 0, 400, 400);
//Set SlideSize.Type Property
pres.getSlideSize().setType(SlideSizeType.Custom);
pres.getSlideSize().setSize(new Dimension((int)chart.getHeight(), (int)chart.getWidth()));
//Save presentation to disk
pres.save(“D:\sizeType.pdf”, SaveFormat.Pdf);
pres.save(“D:\sizeType.pptx”, SaveFormat.Pptx);

I hope this will be helpful. Please share if I may help you further in this regard.

Best Regards,