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

Free Support Forum - aspose.com

Convert PDF to EMF


I find a problem about convert a PDF to emf file, I want create emf file with bitmap, but I follow with step on line, it is not work, it looks like just image, no bitmap, do you have any other API work for this?

Thank you

Hi Rui,

Thanks for using our API’s.

I have tested the scenario using latest release of Aspose.Pdf for .NET 11.4.0 where I have used my sample PDF files with following code snippet and I am unable to notice any issue. However if you are facing any issue, please share your input document, so that we can further look into this matter. We are sorry for this inconvenience.


// Open document<o:p></o:p>

Document pdfDocument = new Document("c:/pdftest/test.pages.txt.pdf");

for (int pageCount = 1; pageCount <= pdfDocument.Pages.Count; pageCount++)


using (FileStream imageStream = new FileStream("c:/pdftest/test.pages_image" + pageCount + ".emf", FileMode.Create))


// Create Resolution object

Resolution resolution = new Resolution(300);

// Create PNG device with specified attributes

// Width, Height, Resolution

EmfDevice emfDevice = new EmfDevice(500, 700, resolution);

// Convert a particular page and save the image to stream

emfDevice.Process(pdfDocument.Pages[pageCount], imageStream);

// Close stream




Hi Nayyer

for the well-format EMF file. they should have bitmap and vector data include, I use this sample code to test the pdf file. it is looks like the just put a PNG in EMF file, if you try to zoom in the emf file, it is not clean, so I think it is not a “true” emf file

Thank you


Hi Rui,

Thanks for the acknowledgement.

Yes. Currently when rendering PDF files to EMF format, the image is rendered in raster format. However we request you to please share your resource/input PDF file, so that we can further investigate the possibility of enhancing EMF file rendering. We are sorry for this inconvenience.


I attach the pdf file

Hi Rui,

Thanks for sharing the resource file.

I have tested the scenario and I am able to
notice the same problem. For the sake of correction, I have logged this problem
PDFNEWNET-40554 in our issue tracking system. We will
further look into the details of this problem and will keep you updated on the
status of correction. Please be patient and spare us little time. We are sorry
for this inconvenience.