在不使用特定C#库的情况下将PDF转换为JPG /图像
是否有免费的C#库 ( .dll )将PDF转换为图像 ?
我尝试过这个:
https://code.google.com/p/lib-pdf/
但它没有用,我收到了这个错误:
Could not load file or assembly 'libpdf.DLL' or one of its dependencies. The specified module could not be found.
iTextSharp没有实现这样的function..
编辑:
我没有使用ghost scrpit,因为你必须先在计算机上安装它
但现在我找到了一个解决方案:如果你加载manualy它的工作原理
http://sofzh.miximages.com/c%23/ rasterizer.Open(file, vesion, false); for (int i = 1; i = rasterizer.PageCount; i++) { string pageFilePath = Path.Combine(outputPath, Path.GetFileNameWithoutExtension(file) + -p + i.ToString() + .jpg”); Image img = rasterizer.GetPage(dpi, dpi, i); img.Save(pageFilePath, ImageFormat.Jpeg); } rasterizer.Close(); } }