Support to reduce the size of SVG image using Aspose.Imaging for Java

Hi there,

We are using 18.6(aspose-imaging-18.6-jdk16.jar) imaging jar for converting EMF images to SVG files.

Is there a way to reduce the size of the output file ?



I have observed your comments. Can you please share source files so that we may further investigate to help you out.

@Adnan.Ahmad, (28.3 KB)

EMF file size is 237 KB
SVG file size is 251 KB

Is there a way we could reduce the file size to match EMF file or even lesser than (may be 20 - 30% lesser than) EMF file size

I am using below code snippet.

            String dataDir = "C:\\ media\\";		
	System.out.println("Load start : "+System.currentTimeMillis());		
	Image image = Image.load(dataDir + "image7.emf", new MetafileLoadOptions(true));		
	System.out.println("Load end   : "+System.currentTimeMillis());
	try {
		// Create an instance of EmfRasterizationOptions class and set
		// different options
		System.out.println("Conversion start : "+System.currentTimeMillis());
		final EmfRasterizationOptions emfRasterizationOptions = new EmfRasterizationOptions();
		// convert it to SVG format. + file.getName()+".svg", new SvgOptions() {
	} finally {
			System.out.println("Conversion end   : "+System.currentTimeMillis());


I suggest you to please try exploring setting vertical and horizontal resolutions on your end. You may try different values on your end.

SvgOptions opts=new SvgOptions();
ResolutionSetting ressetting=new ResolutionSetting();

@mudassir.fayyaz, I did tried resolution options, but not able to reduce the size of the file.


I have further discussed the requirement internally on our end. Actually, EMF and SVG are vector formats and there is no way to achieve a reduced size exported SVG using API.