C# 使用.NETC从PDF中提取图像#
我想从PDF中提取图像。尝试了许多解决方案,但仍然没有得到解决方案。帮助我…提前感谢可用于从PDF中提取图像 以下示例演示如何从PDF中提取所有图像:C# 使用.NETC从PDF中提取图像#,c#,.net,image,pdf,extract,C#,.net,Image,Pdf,Extract,我想从PDF中提取图像。尝试了许多解决方案,但仍然没有得到解决方案。帮助我…提前感谢可用于从PDF中提取图像 以下示例演示如何从PDF中提取所有图像: static void ExtractAllImages() { string path = ""; using (PdfDocument pdf = new PdfDocument(path)) { for (int i = 0; i < pdf.Images.Count; i+
static void ExtractAllImages()
{
string path = "";
using (PdfDocument pdf = new PdfDocument(path))
{
for (int i = 0; i < pdf.Images.Count; i++)
{
string imageName = string.Format("image{0}", i);
string imagePath = pdf.Images[i].Save(imageName);
}
}
}
static void extractalImage()
{
字符串路径=”;
使用(PdfDocument pdf=新PdfDocument(路径))
{
对于(int i=0;i
该库不会对图像重新采样。它将保存与PDF中完全相同的内容
免责声明:我为图书馆的供应商Bit Miracle工作。@mlk是正确的,如果您进行简单的谷歌搜索,您将看到iTextSharp是解决此问题的最佳工具。请注意,这是一款具有30天评估模式的商业产品。目前最便宜的许可证价格为595美元,最昂贵的私人协商无限期权的价格可能远远超过2000美元。请参见此处的定价信息:这可能就是为什么它只占所有图像的50%左右