Free Support Forum - aspose.com

Aspose.Imaging for Net EMF文件转PDF失败

emf文件通过Aspose.Imageing for net 转为PDF文件时,发生异常:Image export failed.
代码如下:
using (var image = (EmfImage)Image.Load(filePath))
using (FileStream outputStream = new FileStream(outputfile, FileMode.Create))
{
if (!image.Header.EmfHeader.Valid)
{
throw new ImageLoadException(string.Format(“The file {0} is not valid”, outputfile));
}

            EmfRasterizationOptions emfRasterization = new EmfRasterizationOptions();
            emfRasterization.PageWidth =(float) (210*96/25.4);
            emfRasterization.PageHeight = (float)(297*96/25.4);
            //emfRasterization.BackgroundColor = Color.WhiteSmoke;

            PdfOptions pdfOptions = new PdfOptions();
            pdfOptions.VectorRasterizationOptions = emfRasterization;

            image.Save(outputStream, pdfOptions);
        }

调试时到image.save时发生了Image export failed.的异常。原始文件为1.emfemf文件.zip (3.4 KB);异常信息见图片异常信息图.png (24.7 KB)

@iccolor

我已经在我们的问题跟踪系统中打开了ID为IMAGINGNET-4115的票证,以进一步调查和解决问题。 该线程已与问题关联,因此一旦问题解决,您可能会收到通知。