EMF to PDF format issues

I am experiencing an issue when converting EMF files to PDF using Aspose Imaging for Java. The formatting of the content in the resulting PDF does not match the original EMF file.
Example_EMF_PDF.zip (11,1 KB)

Could you let me know if there is a known solution or workaround to avoid this issue?

I have attached example EMF files and the corresponding incorrect PDF outputs for reference.

Thank you for your support.

@JustinITWU Hello! Thanks for your interest in our product. Would you please share the sample code you’re using for the conversion? We’ll look into the issue and get back to you soon.

Hello. This is the method I use.

public static String convertEMFtoPDF(String path) {

	com.aspose.imaging.Image image = com.aspose.imaging.Image.load(path);
	PdfOptions pdfOptions = new PdfOptions();

	EmfRasterizationOptions rasterizationOptions = new EmfRasterizationOptions();

	rasterizationOptions.setPageWidth(image.getWidth());
	rasterizationOptions.setPageHeight(image.getHeight());

	pdfOptions.setVectorRasterizationOptions(rasterizationOptions);

	String savePath = path.replaceFirst("emf", "pdf");
	image.save(savePath, pdfOptions);
	image.close();
	return savePath;

}

@JustinITWU Thank you, we will look into this issue.

@JustinITWU Hello,
Our team is actively investigating and attempting to reproduce the problem. To help us resolve this more efficiently, could you please provide:

  • Your application’s operating environment
  • The version of Aspose.Imaging you’re currently using

If you’re not using the latest version, we recommend upgrading first, as this may resolve the issue. We’ll continue investigating once we receive these details.

@Alexey.Karpenko Hello,

Thank you for your support and quick response. After updating to the latest version of Aspose.Imaging, the issue has been resolved.

I appreciate your assistance.

Best regards

1 Like