Hi. I tested many pdf libraries converting pdf to image. aspose.pdf is very good. But certain pdf can not converted properly. Please make it correct. thanks.
public override void DoIt()
{
Aspose.Pdf.License license = new Aspose.Pdf.License();
license.SetLicense(“Aspose.PDF.NET.lic”);
var files = GetPdfFiles();
Resolution resolution = new Resolution(1200);
JpegDevice jpegDevice = new JpegDevice(resolution);
jpegDevice.RenderingOptions.InterpolationHighQuality = true;
jpegDevice.RenderingOptions.IgnoreResourceFontErrors=true;
foreach (var file in files)
{
Document pdfDocument = new Document(file.FullName);
using (FileStream imageStream =
new FileStream(GetSaveFilename(file), FileMode.Create))
{
jpegDevice.Process(pdfDocument.Pages[1], imageStream);
imageStream.Close();
};
}
}
pdf to image only outline
240222-2847788-1.pdf (504.0 KB)
240222-2847788-1.jpg (142.8 KB)