Aspose.Slides for Java (or) .NET

Hi,

We are using Aspose.Slides for Java 1.9.0.0 . We find problems with conversion of certain auto shapes to images and with reading certain type of Power point files.

Just Wanted to know , how superior/inferior is Aspose.Slides for .NET over JAVA. Is there any additional features that are available in .NET version other than JAVA . Is there a comparison document between the two versions. Which one do u recommend , Java or .NET version for better conversion.

Regards
J.Karthik
(http://zoho.com)

Hello,

If you are planning to create or change presentations it doesn’t matter what version .Net or Java to use.
But if you need conversion of slides to images then .Net version should work better.
The difference is not too large but Java version can’t render line caps for example arrows and others.
Also .Net version has better text rendering just because it uses the same GDI like PowerPoint to draw it.

Hi,

One more question , while converting Shapes to Images in Java Version , the image comes with a white background (i.e it is not transparent). Will the image converted in .NET version be transparent i.e will it come without the white background.

If not , is there any way so that i can remove the white patches from the shape surrounding (will this work if the fill for the shape is white in color).

Regards
J.Karthik

Dear J.Karthik,

Both versions create the shape images with solid background. But I have found a workaround in .NET to get image with transparent background; you may find similar workaround in JAVA.

See the code below and the attached source presentation and transparent output image.

//Read the source presentation
Presentation pres = new Presentation(@"c:\srcPres.ppt");

//Get first slide
Slide sld = pres.GetSlideByPosition(1);

//Get the only oval shape
Shape shp = sld.Shapes[0];

//Get the image of the shape
//The image will be 300x300
int OFFSET = 100;
Image img = sld.GetThumbnail(new Shape[] { shp }, new Size(100, 100),
    new System.Drawing.Rectangle(shp.X - OFFSET, shp.Y - OFFSET, shp.Width + 2 * OFFSET, shp.Height + 2 * OFFSET));

//Create a bitmap from above image
Bitmap bmp = new Bitmap(img);

//Set the white color transparent
bmp.MakeTransparent(Color.White);

//Save the image on Disk
bmp.Save("c:\\transparent.png", ImageFormat.Png);

Hi,

Many thanks for your reply.

We have such a work around in Java(to remove white patches to make the shape transparent) , but the problem here is it also makes the shape transparent when the fill type of the shape is SOLID White.

Do you have any solution to overcome this problem , please advice.

Regards
J.Karthik
(http://zoho.com)

I don’t know programmatically; but you might search on internet. The idea is to fill the shape exterior with some other fill color and then make that color transparent.

I assume, the shape will be closed and not open.