以下c#程序可以读取大多数的PDF中的文本内容。
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 iTextSharp;
using iTextSharp.text;
using iTextSharp.text.pdf;
using iTextSharp.text.xml;
namespace PDFR
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
//退出程序的按钮
private void button2_Click(object sender, EventArgs e)
{
Application.Exit();
}
//开始运行程序的按钮
private void button1_Click(object sender, EventArgs e)
{
string pdfStr = readPDF(文件名);
System.IO.File.WriteA