python pdf获取关键字坐标_iTextSharp获取pdf文件中指定关键字的坐标位置信息

using iTextSharp.text;

using iTextSharp.text.pdf;

using System;

using System.Drawing;

using System.IO;

using System.Windows.Forms;

namespace Test1

{

public partial class Form2 : Form

{

public Form2()

{

InitializeComponent();

}

private void Form2_Load(object sender, EventArgs e)

{

//Document document = new Document();

//document.AddKeywords("设计");

//读pdf

PdfReader pdfReader = new PdfReader(@"C:/Users/Administrator/Desktop/电气箱门.pdf");

//保存新的pdf

PdfStamper pdfStamper = new PdfStamper(pdfReader, new FileStream("C:/Users/Administrator/Desktop/output1.pdf",

FileMode.Create, FileAccess.Write, FileShare.None));

//获取系统的字体

BaseFont baseFont = BaseFont.CreateFont("C:\\Win

你可能感兴趣的:(python,pdf获取关键字坐标)