- Code: Select all
public Boolean ConvertPDFToImage(string pdfFileName)
{
PdfDocument doc = new PdfDocument();
doc.LoadFromFile(pdfFileName);
Image bmp = doc.SaveAsImage(0);
outputFile = pdfFileName.Replace(".pdf", ".bmp");
bmp.Save(outputFile);
doc.Dispose();
return true;
}
BTW: outputFile is defined in the class with getters and setters that is why it is not defined in this method locally but used in the method.
At any rate, I need the original released by your library once it is done so that I can delete the original PDF that has been converted.