Hi Steven,
Thanks for contacting support and sorry for the delayed response.
We have an API named Aspose.Imaging for .NET which provides the capabilities to manipulate image formats. As per your requirement, I am afraid currently it does not support direct conversion of WMF to PDF format. However you may consider Converting WMF to PNG format and either use Aspose.Words to Convert an Image to PDF or try using Aspose.Pdf for .NET to Add Image to Existing PDF File.
We are sorry for this inconvenience.
Hi Steven,
Adding more to my previous comments, I have further discussed the scenario with respective team and in order to perform direct WMF to PDF conversion, you can only use Aspose.Imaging for .NET API. Please take a look over following C# code snippet to fulfill the requirement.
In case you encounter any issue, please share the input WMF file, so that we can test the scenario in our environment.
// Load an existing WMF image
using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load("c:/pdftest/sample.wmf"))
{
// Create an instance of EmfRasterizationOptions class and set different properties
Aspose.Imaging.ImageOptions.EmfRasterizationOptions emfRasterizationOptions = new Aspose.Imaging.ImageOptions.EmfRasterizationOptions();
emfRasterizationOptions.BackgroundColor = Aspose.Imaging.Color.WhiteSmoke;
emfRasterizationOptions.PageWidth = image.Width;
emfRasterizationOptions.PageHeight = image.Height;
// Create an instance of PdfOptions class and provide rasterization option
Aspose.Imaging.ImageOptions.PdfOptions pdfOptions = new Aspose.Imaging.ImageOptions.PdfOptions();
pdfOptions.VectorRasterizationOptions = emfRasterizationOptions;
// Call the save method, provide output path and PdfOptions to convert the WMF file to PDF and save the output
image.Save("c:/pdftest/ConvertWMFToPDF_out.pdf", pdfOptions);
}
Thanks for the replies, however my goal was to use something that didn’t require loading a file from disk, but could use the .Net Metafile directly in memory. Unfortunately it doesn’t sound like there’s anything available for that.
Hi Steven,
Thanks for the reply.
Hi Steven,
Hello,
I see that the two issues noted here have been set to postponed. Is there any sort of timeframe for when we can expect these fixes to be put in place? We are still having to drag along the Aspose Words API with our installations, which we are keen to avoid and to just be able to make use of the PDF control.
Any update you can provide is appreciated.
Thanks,
Steven
The linked ticket IDs IMAGINGNET-2400 and PDFNET-35082 are not resolved yet. These tickets could take time because their implementation is long, and other high priority tickets are in queue. In order to escalate priority, we recommend our clients to post their critical issues in the paid support forum. You can also post these ticket IDs in the paid support forum. Please refer to this help topic: Paid Support Helpdesk
The issues you have found earlier (filed as PDFNET-35082) have been fixed in Aspose.PDF for .NET 19.1.