using (PdfDocument pdfDocument = new PdfDocument(fileSavePath))
{
foreach (PdfPageBase page in pdfDocument.Pages)
{
//查找的字符串
string findText = "";
//替换字符串
string newText = " ";
//替换文本
PdfTextReplacer ptr = new PdfTextReplacer(page);
ptr.ReplaceAllText(findText, newText);//全部替换
}
pdfDocument.SaveToFile(fileSavePath);
}
标签:fileSavePath,findText,pdfDocument,Spire,PdfTextReplacer,PDF,文本,替换
From: https://www.cnblogs.com/cqpanda/p/16915225.html