Hi. I am converting PDF to PNG through the code below;
using (Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(file))
{
Aspose.Pdf.PageCollection pageCollection = pdfDocument.Pages;
Aspose.Pdf.Page pdfPage = pageCollection[selectedPage];
using (MemoryStream imageStream = new MemoryStream())
{
Resolution resolution = new Resolution(**quality**);
PngDevice pngDevice = new PngDevice(resolution);
pngDevice.Process(pdfPage, imageStream);
using (Bitmap img = new Bitmap(imageStream))
{
img.Save(output);
}
The problem is the higher ‘quality’ doesn’t guarantee better image quality.
For example, depending on the PDF file, ‘quality’ 386 image output quality could be better
than ‘quality’ 1800 image output.
Is there are any way to find the ‘quality’ value for the best image output quality?