Hi Geoff,
Thanks for your request, highlighted text in the PDF Document will not be jagged after conversion to PNG by using the below code.
Document pdfDocument = new Document("adobe.pdf");
using (FileStream imageStream = new FileStream("image.png", FileMode.Create))
{
//create PNG device with specified attributes
//Width, Height, Resolution, Quality
//Quality [0-100], 100 is Maximum
//create Resolution object
Resolution resolution = new Resolution(700);
PngDevice pngDevice = new PngDevice(resolution);
//convert a particular page and save the image to stream
pngDevice.Process(pdfDocument.Pages[1], imageStream);
//close stream
imageStream.Close();
}
Please do let us know if you need any further assistance.
Thanks & Regards,
Rashid Ali
Support Developer
Aspose Sialkot Team
http://www.aspose.com/Aspose – Your File Format Experts