We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

EMF to Pdf conversion


I am trying to convert emf files to pdf using Aspose.Pdf. I am not able to find any samples to do so.

Could you please pass me some?


Hi Kulsum,

Thanks for contacting support.

Please try using the following code snippet to accomplish your requirement.


//Instantiate a Pdf object by calling
its empty constructor

Aspose.Pdf.Generator.Pdf pdf1 = new Aspose.Pdf.Generator.Pdf();

//Create a section in the Pdf object

Aspose.Pdf.Generator.Section sec1 = pdf1.Sections.Add();

//Create an image object in the section

Aspose.Pdf.Generator.Image image1 = new Aspose.Pdf.Generator.Image(sec1);

//Add image object into the Paragraphs collection of the section


//Set the path of image file

image1.ImageInfo.File = "C:/pdftest/test.emf";

//Set the type of image using ImageFileType enumeration

image1.ImageInfo.ImageFileType = Aspose.Pdf.Generator.ImageFileType.Emf;

//Set image title

image1.ImageInfo.Title = "EMF image";

//Save the Pdf


Please visit the following links for further information on