寻找解决方案,以PDF文件的指定页面转换为位图图像。
Looking for solution to convert a specified page of a pdf file to a bitmap image.
(声明我在软件二十一世纪制作该组件)的
如果你不想惹Ghostscript的API和需要快速有效的解决方案来转换PDF文档光栅图像(PNG,JPG,......),你可以使用超级Pdf2Image转换.NET 。它可用于32位和64位,是非常便宜和有效的。
If you don't want to mess with Ghostscript API and need a quick working solution to convert PDF documents to raster images (PNG, JPG, ...), you could use Super Pdf2Image Converter .NET. It's available for both 32 and 64 bit and is very cheap and effective.
您可以到这里看看: http://softwaresigloxxi.com/SuperPdf2ImageConverter.html
例如,这里有一个样品code转换:
For instance, here's a sample code for converting:
// Instantiate the component
Pdf2ImageConverter p2i = new Pdf2ImageConverter(pdfPath);
// Get page count of a PDF file
int pages = p2i.GetPageCount();
// Get size of any page
int width, height;
p2i.GetPageSize(1, out width, out height);
// Convert any page of PDF to image file (preserving aspect ratio)
p2i.GetImage(outputImagePath, pageNumber, resolution, imageFormat);
// Or... convert any page of PDF to image (returns bitmap object)
Bitmap bm = p2i.GetImage(pageNumber, resolution, width, height, imageFormat);
上一篇:更改默认" Default.aspx的"到" Index.aspx的"在Visual Studio 2010中aspx、Default、QUOT、Index
下一篇:DirectoryEntry.NativeObject引发拒绝访问的用户在管理员组中的Windows 2008组中、管理员、用户、NativeObject