无法在命名空间中找到A类在c#中

时间:2013-05-20 07:31:04

标签: c# pdf aspose

我在c#中从pdf中提取图像。
有人建议使用Aspose命名空间,这是第三方命名空间。 我已经下载了aspose并将其作为参考包含在我的项目中。但问题是我无法找到用于提取图像的类PdfExtractor。
我正在分享一些建议使用aspose并分享我的代码的链接。 This is a link

和我的代码中我只包括aspose

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using Aspose;
using Aspose.Pdf;
using Aspose.Pdf.Devices;
using Aspose.Pdf.DOM;
using Aspose.Pdf.Generator;
using Aspose.Pdf.InteractiveFeatures;
using Aspose.Pdf.Structure;
using Aspose.Pdf.Text;
namespace Imageget
{
     public partial class Form1 : Form
  {
       public Form1()
       {
        InitializeComponent();
       }

  }
}

链接中建议的类是PdfExtractor我也在下面分享它的代码,所以不能浪费他的时间去链接。

PdfExtractor objExtractor = new PdfExtractor();

//bind input pdf file

objExtractor.BindPdf("input.pdf");

//extract image with specific mode

objExtractor.ExtractImage(ExtractImageMode.Default);

//check if images extracted and save them one by one

while (objExtractor.HasNextImage()) {
objExtractor.GetNextImage(DateTime.Now.Ticks.ToString() + ".jpg");

          }

1 个答案:

答案 0 :(得分:0)

谷歌第一眼看到你可能需要添加命名空间:

Aspose.Pdf.Facades

查看here并查看左侧的树。

并且不要忘记在顶部查看我的评论,如果我找不到它,它总是有助于找到类的命名空间。

希望它有所帮助!