Dotted lines are changing to solid lines in graphs

Hi there,

We are using aspose-imaging-18.6.1-jdk16.jar for converting the EMF images to SVG format.

We are seeing issues related graphs where dotted lines are changing to solid lines.

We are using the below code snippet for converting.

String dataDir = “C:\ media\”;
Image image = Image.load(dataDir + “image11.emf”, new MetafileLoadOptions(true));
try {
// Create an instance of EmfRasterizationOptions class and set
// different options
final EmfRasterizationOptions emfRasterizationOptions = new EmfRasterizationOptions();
// emfRasterizationOptions.setBackgroundColor(Color.getWhite());
emfRasterizationOptions.setPageWidth(image.getWidth());
emfRasterizationOptions.setPageHeight(image.getHeight());

// convert it to SVG format.
image.save(baseDir + file.getName()+".svg", new SvgOptions() {
{
setVectorRasterizationOptions(emfRasterizationOptions);
}
});
} finally {
image.dispose();
}
//ExEnd:ConvertEMFtoSVG

images-04.zip (30.4 KB)

@gmusturi,

I have observed your comments. An issue with ID IMAGINGJAVA-1026 has been created in our issue tracking system to investigate the issue. This thread has been linked with the issue so that you may be automatically notified once the issue will be fixed.

Hi there,

We have been told that the dotted lines changing to solid lines in graphs issue has been addressed as part of aspose-imaging-18.8-jdk16.jar

I just tested the fix and could still issue in the converted SVG image.

Attached images are for your reference.

Thanks

179238.zip (15.1 KB)

@gm69267,

I have observed your comments. Can you please try to use below sample code and share feedback with us if there is still an issue.

String fileName = “image11.emf”;
String baseFolder = “D:\”;
String inputFileName = baseFolder + fileName;
String outputFileName = baseFolder + fileName + “.svg”;

Image image = Image.load(inputFileName);
try
{
EmfRasterizationOptions emfRasterizationOptions = new EmfRasterizationOptions();
emfRasterizationOptions.setPageSize(Size.to_SizeF(image.getSize()));

SvgOptions svgOptions = new SvgOptions ();
svgOptions.setVectorRasterizationOptions(emfRasterizationOptions);
image.save(outputFileName, svgOptions);
}
finally
{
image.close();
}

Yes, I still see the issue for the image attached in my previous comment.Please let me know if you need any more details.

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

@gm69267,

Please try using suggested code using Aspose.Imaging for Java 18.8 and with license applied.

Hi there,

I used 18.8 version with licence applied. If I didn’t the licence, it would have printed the trial version details in the converted image.

Thanks,

You might want to refer the images I have attached in my previous comment. Attaching them again for your reference.

179238.zip (15.1 KB)

@gm69267,

I have observed the new EMF shared by you and have been able to reproduce the issue with new file. An issue with ID IMAGINGJAVA-1075 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.

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